vba word open document read only code example
Example: vba word open document read only
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