如何在不自动化的情况下创建 MsWord 目录?

发布于 2024-07-28 03:01:43 字数 481 浏览 6 评论 0原文

我正在使用 Aspose.Words 在服务器上以编程方式 (C#) 构建 Word 文档。 客户端可以通过 Web 界面导入动态生成的文档。 一切都很好,除了我无法生成目录。 我已经用尽了 Aspose 的所有选择。 Aspose 目前不支持更新 TOC 字段的功能。 所以......我对任何其他可行的解决方案持开放态度,即使它涉及其他第三方组件。 自动化已被排除,因为Word文档是在服务器端构建的,并且Microsoft不建议在服务器上使用自动化。

有人能提出解决方案吗? 最佳解决方案就是能够以编程方式执行 TOC 字段更新。 该解决方案不需要在服务器上安装 Word。 是否有任何服务器端报告组件支持此功能?

如果没有简单的 TOC 字段更新解决方案,那么下一个最好的办法可能是通过检查 Word 文档并提取页码以编程方式构建 TOC。

欢迎所有想法和意见。 我很快就需要一个解决方案。

谢谢,

艾德

I'm using Aspose.Words to construct a Word Document programmatically (C#) on a server. The dynamically generated documents can be imported by clients via a web interface. Everything is great except I'm unable to generate a TOC. I've already exhausted my options with Aspose. Updating TOC fields is simply not a feature that Aspose currently supports. So... I'm open to any other viable solution even if it involves other third-party components. Automation has been ruled out because the Word Document is constructed on the server-side and Microsoft does not recommend using Automation on servers.

Can anyone suggest a solution? The optimal solution would be simply to be able to programmatically do a TOC Field Update. The solution cannot require installation of Word on the server. Are there any server-side reporting components that support this feature?

If a simple TOC Field Update solution is not available, then the next best thing would probably be the ability to programmatically construct a TOC by inspecting the Word document and extracting page numbers.

All ideas and input are welcome. I need a solution very soon.

Thanks,

Ed

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

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

发布评论

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

评论(1

瑾兮 2024-08-04 03:03:59

检查这个

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.documentbuilder.inserttableofcontents.html

但是我可以找不到一种方法可以在不使用 MS Word 中的 F9 键的情况下自动生成它...

Check this

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.documentbuilder.inserttableofcontents.html

BUt i can't find a way to generate it automatically without using F9 key in MS Word...

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