Word 2010 Interop: изменить заголовок документа Word

Я использую Word 2010 и элемент управления DSOFramer для встроенного документа Word в приложении Winforms, и я должен войти в режим редактирования заголовка. Я использую код ниже:

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;

С наилучшими пожеланиями.

1 ответ

Решение можно найти здесь Word 2010 header edition

Другие вопросы по тегам