vba word open document read only

The solution for “vba word open document read only” can be found here. The following code will assist you in solving the problem.

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

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts