I have some code that sets an [event procedure] for a command button to find a word file and open it. The code is as follows-
Private Sub Command1053_Click()
Dim wordobj As Word.Application
On Error GoTo ErrHandler
Set wordobj = GetObject(, "Word.Application"
wordobj.Application.Visible = True
wordobj.Documents.Open ("I:\MGM\CST\SITEWRKS\FORMS\isolations Database\TBQ - QUOTATION.doc"
Exit Sub
ErrHandler:
Set wordobj = CreateObject("Word.Application"
Resume Next
End Sub
Access fails to compile wordobj and i have forgotten how to swith it on....
Please help if you can
Private Sub Command1053_Click()
Dim wordobj As Word.Application
On Error GoTo ErrHandler
Set wordobj = GetObject(, "Word.Application"
wordobj.Application.Visible = True
wordobj.Documents.Open ("I:\MGM\CST\SITEWRKS\FORMS\isolations Database\TBQ - QUOTATION.doc"
Exit Sub
ErrHandler:
Set wordobj = CreateObject("Word.Application"
Resume Next
End Sub
Access fails to compile wordobj and i have forgotten how to swith it on....
Please help if you can