W
woody
i have an access database, it opens with a menu form, one
of the options it to open up a letter from the form.
i set a reference to the word dll.
use the following code which works in vb6.
but here i get activex unable to create object.
i have no idea what i am doing wrong.
please help.
thanks
Woody
Dim wordApp As Object
wordApp = GetObject(, "Word.Application")
If Err <> 0 Then
wordApp = CreateObject(Word.Application)
End If
wordApp.Documents.Open FileName:=app.Path & "Letter.doc"
wordApp.Quit
Set wordApp = Nothing
of the options it to open up a letter from the form.
i set a reference to the word dll.
use the following code which works in vb6.
but here i get activex unable to create object.
i have no idea what i am doing wrong.
please help.
thanks
Woody
Dim wordApp As Object
wordApp = GetObject(, "Word.Application")
If Err <> 0 Then
wordApp = CreateObject(Word.Application)
End If
wordApp.Documents.Open FileName:=app.Path & "Letter.doc"
wordApp.Quit
Set wordApp = Nothing