自动更新 rtf 文档中的 pageref 字段

发布于 2024-07-09 12:14:23 字数 130 浏览 5 评论 0原文

我正在开发的应用程序将文档输出为 rtf 格式,并且 PAGEREF 字段用于目录页和索引页。 问题是打开文档时字段不会更新并保持空白。 如果您手动更新 Word 中的字段,它们将正常工作。 有没有办法让 RTF 规范中的这些字段自动更新?

The application I'm working on outputs documents to rtf format and PAGEREF fields are used in a table of contents page and an index page. The problem is that on opening the document the fields do not update and remain blank. They work correctly if you manually update the fields in Word. Is there a way to make these fields auto-update in the RTF spec?

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

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

发布评论

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

评论(1

就是爱搞怪 2024-07-16 12:14:23

您可以尝试创建 Document_Open() 宏,但您可能无法将宏添加到 rtf 文件中。 您可以在模板 (.dot) 中添加宏并让 .rtf 文件引用该模板。

Private Sub Document_Open()
End Sub

You could try to create a Document_Open() macro, although you might not be able to add a macro to an rtf file. You might be able to add a macro at a template (.dot) and have the .rtf file reference the template.

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