1

如何以全屏模式打开word文档?它不是以表单形式打开的,而是使用以下代码打开的:

Private MSWord As New Word.Application
Private WordDoc As New Word.Document

Private Sub OpenWordFullScreen(ByVal ReportName As String)
    MSWord = New Word.Application

    WordDoc = MSWord.Documents.Open("C:\" & ReportName & ".doc")

    'Make MSWord visible 
    MSWord.WindowState = Word.WdWindowState.wdWindowStateMaximize
    MSWord.Visible = True
End Sub
4

1 回答 1

2

要全屏打开 word,请添加以下代码段:

WordDoc.ActiveWindow.View.FullScreen = True

因此,您的代码将如下所示:

Private Sub OpenWordFullScreen(ByVal ReportName As String)
    MSWord = New Word.Application

    WordDoc = MSWord.Documents.Open("C:\" & ReportName & ".doc")

    'Make MSWord Visible
    MSWord.Visible = True
    WordDoc.ActiveWindow.View.FullScreen = True
End Sub
于 2013-05-27T18:07:53.293 回答