Hi:
From Access I'm opening a Word document with the following code. I want it to be Read Only without any message boxes, password boxes, etc. for the user. Just open as Read Only. Can this be done?
Thanks,
xeb
Private Sub Command1_Click()
Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "c:\Doc1.doc"
If Dir(LWordDoc) = "" Then
MsgBox "Document not found."
Else
'Create an instance of MS Word
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
'Open the Document
oApp.Documents.Open filename:=LWordDoc
End If
End Sub
From Access I'm opening a Word document with the following code. I want it to be Read Only without any message boxes, password boxes, etc. for the user. Just open as Read Only. Can this be done?
Thanks,
xeb
Private Sub Command1_Click()
Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "c:\Doc1.doc"
If Dir(LWordDoc) = "" Then
MsgBox "Document not found."
Else
'Create an instance of MS Word
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
'Open the Document
oApp.Documents.Open filename:=LWordDoc
End If
End Sub