📜  vba word 打开文档只读 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:54.307000             🧑  作者: Mango

代码示例1
Sub OpenWord()
Dim WordApp As Object
Dim WordDoc As Object

Set WordApp = CreateObject("Word.Application")
Set WordDoc = WordApp.Documents.Open(Filename:="C:\test\test.doc", ReadOnly:=True)
WordApp.Visible = True

'do your stuff

Set WordDoc = Nothing
Set WordApp = Nothing
End Sub