2011-07-13 10 views
0

私は単語2010とWinFormsのアプリケーションに埋め込まれたWord文書にDSOFramerコントロールを使用していますが、私は以下のコードを使用していたヘッダ編集モードに入ることがあります。単語2010相互運用機能:編集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;

よろしくお願いいたします。

答えて

関連する問題