I have looked through the old posts and found a thread that has helped me get the code I think I need to open a Word document from Access. I have modified it slightly but I need to run this code from a command button, I used this code which I thought would work
Private Sub cmdNotes_Click()
Call OpenWordDoc(“U:Global InformationUser ManualsExpenseTracking.doc”)
End Sub
Public Sub OpenWordDoc(strFilePath As String)
Dim appWord As Word.Application
Dim doc As Word.Document
strFilePath = “U:Global InformationUser ManualsExpenseTracking.doc”
Set appWord = New Word.Application
Set doc = appWord.Documents.Open(strFilePath)
appWord.Visible = True
appWord.Activate
Set appWord = Nothing
Set doc = Nothing
End Sub
Now I’m getting a new error:
Compile Error:
User-defined type not defined.
Where am I going wrong?