I have created a form that executes the following code to open Word and merge data into a form letter. It works great in Access/Word 97 but with Access/Word 2003 the mail merge toolbar is not being highlighted to allow me to merge data. The documents works fine if I call it up thru Word but not when I activate it thru the form I created.
Any thoughts ?? Probably something simple that I'm overlooking.
Thanks, RLF
Private Sub Print_Cover_Sheets_Click()
On Error GoTo Err_Print_Cover_Sheets_Click
Dim doc As Word.Document, wrdApp As Word.Application
On Error Resume Next
Set wrdApp = GetObject(, "word.application")
If Err.Number <> 0 Then
Set wrdApp = CreateObject("word.application")
End If
wrdApp.Visible = True
Set doc = wrdApp.Documents.Open("C:\my documents\scottk\documents\askcov.doc")
Exit_Print_Cover_Sheets_Click:
Exit Sub
Err_Print_Cover_Sheets_Click:
MsgBox Err.Description
Resume Exit_Print_Cover_Sheets_Click
End Sub
Any thoughts ?? Probably something simple that I'm overlooking.
Thanks, RLF
Private Sub Print_Cover_Sheets_Click()
On Error GoTo Err_Print_Cover_Sheets_Click
Dim doc As Word.Document, wrdApp As Word.Application
On Error Resume Next
Set wrdApp = GetObject(, "word.application")
If Err.Number <> 0 Then
Set wrdApp = CreateObject("word.application")
End If
wrdApp.Visible = True
Set doc = wrdApp.Documents.Open("C:\my documents\scottk\documents\askcov.doc")
Exit_Print_Cover_Sheets_Click:
Exit Sub
Err_Print_Cover_Sheets_Click:
MsgBox Err.Description
Resume Exit_Print_Cover_Sheets_Click
End Sub