Word 2010互操作:编辑Word文档标题
我正在使用word 2010和DSOFramer控件在winforms应用程序中嵌入word文档,我必须进入标题编辑模式我正在使用下面的代码:
if (wordDocument.ActiveWindow.View.SplitSpecial != WdSpecialPane.wdPaneNone)
wordDocument.ActiveWindow.Panes[2].Close();
if (wordDocument.ActiveWindow.ActivePane.View.Type == WdViewType.wdNormalView ||
wordDocument.ActiveWindow.ActivePane.View.Type == WdViewType.wdOutlineView)
wordDocument.ActiveWindow.ActivePane.View.Type = WdViewType.wdPrintView;
wordDocument.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageHeader;
但应用程序在执行此行时变得无响应:
wordDocument.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageHeader;
此致。
I am using word 2010 and DSOFramer control to embedded word document in winforms application and I have to enter the header edit mode I am using the code below :
if (wordDocument.ActiveWindow.View.SplitSpecial != WdSpecialPane.wdPaneNone)
wordDocument.ActiveWindow.Panes[2].Close();
if (wordDocument.ActiveWindow.ActivePane.View.Type == WdViewType.wdNormalView ||
wordDocument.ActiveWindow.ActivePane.View.Type == WdViewType.wdOutlineView)
wordDocument.ActiveWindow.ActivePane.View.Type = WdViewType.wdPrintView;
wordDocument.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageHeader;
but the application become unresponsive when executing this line :
wordDocument.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageHeader;
Best regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以在此处找到解决方案 Word 2010标题版本
Solution can be found here Word 2010 header edition