在Word中隐藏文本(特别是表格)

发布于 2024-07-19 04:13:34 字数 244 浏览 3 评论 0原文

我一直在处理一个包含许多隐藏部分的文档,可以使用复选框(和 VBA)使这些隐藏部分可见。 其中大部分工作正常,包括使用 Range.Font.Hidden = True 隐藏表格、图片、格式和文本。

我的问题在于隐藏表格,保存文档,然后重新打开文档。

文档保存并关闭正常,但是当重新打开文档时,表格的文本保持隐藏,但显示表格网格线和间距,给人一种奇怪但空的表格的外观。

有谁知道避免这个问题的方法或有什么建议?

I've been working on a document that has a number of hidden sections that can be made visible using check boxes (and VBA). Most of this works fine including hiding Tables, Pictures, Formatting and Text using Range.Font.Hidden = True.

My problem lies with leaving a table hidden, saving the document and then re-opening the document.

The document saves and closes fine, but when reopening the Document the text for the table stays hidden but the table gridlines and spacing are displayed, giving the look of a strange but empty table.

Does anyone know of a way to avoid this problem or have any advice?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绮筵 2024-07-26 04:13:34

您可以像这样隐藏网格线:

ActiveWindow.View.TableGridlines = False

但是,如果您的表格具有自定义边框,则它将不起作用。

You can hide the gridlines like so:

ActiveWindow.View.TableGridlines = False

However, it won't work if your table has custom borders.

煮酒 2024-07-26 04:13:34

在尝试了许多不同的事情之后,即使我有其他部分包含可以正常工作的表格,我最终还是将表格转换回文本,这使得它们可以正常工作。

令人烦恼的是,我似乎找不到问题,但信息就像普通文本一样正常。

After trying a number of different things and even though I have other sections that contain tables that work fine, I have ended up converting the tables back to text which makes them work fine.

It is annoying that I can't seem to find the issue, but the information works out ok just as normal text.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文