I think the problem with Word loading is, it isn't actually an error, unless I close word and the rest of the code can't execute. It will happily create a read-only copy, in this case no error occurs.
I've acted on your advice - and added a more appropriate message (my headache's gone now!)...
Oops. Actually my error handler does prevent the user accessing the code. However a msgBox warning the user the document is locked still appears, how can I disable this & show my 'headache' msgbox first?
I have a mail merge procedure based on bookmarked templates. I have added an error routine:
On Error Goto cmdSendLetter_Click_Error
**Procedure**
Exit Sub
cmdSendLetter_Click_Error:
msgBox ("I'm sorry I have a headache right now" & Chr(13) _
"Please try again later, I may be feeling...
I was having difficulty with OpenDataSource when trying to mail merge from Access to Word. Also I only wanted to merge the current record. I got round it thanks to a post by Benoit Mann on Blue Claw Database Design. Go to http://www.blueclaw-db.com/mail-merge-bookmarks.htm to view the original...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.