Sick_Monkey
09-02-2003, 02:01 AM
I have set up a mail merge as follows:
I created a make table query which passes the required data to a table which in turn merges the fields into Word.
Using the macro wizard I then selected open query from the drop-down menu and then on the second row selected the RunApp function and entered the path of the required document.
The code appears as:
Private Sub Command592_Click()
On Error GoTo Err_Command592_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
DoCmd.RunMacro "Blank_Letter"
Exit_Command592_Click:
Exit Sub
Err_Command592_Click:
MsgBox Err.Description
Resume Exit_Command592_Click
End Sub
When the command button is clicked for the first time, an error message appears asking the user to find the data source. When the database is located manually, the mail merge then works fine. Apparently randomly, the message reappears and from time-to-time the user has to find the data source again.
This is quite a serious problem as some the users of the programme are not really familiar with Access.
None of the documents have been moved.
Thanks
I created a make table query which passes the required data to a table which in turn merges the fields into Word.
Using the macro wizard I then selected open query from the drop-down menu and then on the second row selected the RunApp function and entered the path of the required document.
The code appears as:
Private Sub Command592_Click()
On Error GoTo Err_Command592_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
DoCmd.RunMacro "Blank_Letter"
Exit_Command592_Click:
Exit Sub
Err_Command592_Click:
MsgBox Err.Description
Resume Exit_Command592_Click
End Sub
When the command button is clicked for the first time, an error message appears asking the user to find the data source. When the database is located manually, the mail merge then works fine. Apparently randomly, the message reappears and from time-to-time the user has to find the data source again.
This is quite a serious problem as some the users of the programme are not really familiar with Access.
None of the documents have been moved.
Thanks