0

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;

よろしくお願いします。

4

1 に答える 1