如何在全屏模式下打开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
答案 0 :(得分:2)
要在全屏中打开文字,请添加以下代码段:
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