如何以编程方式更改 Word 2010 文档的布局?
我们有一个应用程序可以读取 Word 文档并将其导入到我们的文件格式中。
最近发现的一个错误是,页数计数仅在页面布局视图中可用,但 Word 2010 默认为 Web 布局。
使用 .NET c# 我们如何更改视图以返回页数?
We have an application that reads Word documents and imports them into our file format.
A recent bug was found that the page count is only available in Page Layout View, however Word 2010 defaults to Web Layout.
Using .NET c# how can we change the view to give us back the page count?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信您正在寻找的属性是
Document.ActiveWindow.View.Type = wdPrintView;
您可以在 MSDN。I believe the property you are looking for is
Document.ActiveWindow.View.Type = wdPrintView;
You can read more in this on MSDN.