xiong
Programmer
- Feb 13, 2003
- 93
This should be fairly simple, but the answer still eludes me.
I am using pseale's mail merge method to merge my data with a few documents (faq181-5088). There are two problems I'm running into.
First, I really need to suppress the warning message "Opening this document will run the following SQL command...." The users get a bit skittish when they see message boxes with big words in them.
I've tried using the DisplayAlerts at various points in the Access code, and have also placed it in the Word OnOpen mod in the source document (see snippet below). It had no effect in the Access code, but with it in the Word document, when the process runs the first time, the message is suppressed. However, when the code runs a second and subsequent times, the message comes back, the view has changed from Page Layout to Normal, and the Control toolbox is now visible.
Second, in some cases I will need to merge a document with customer detail information as well as subsets of data (lists of payments made, dates of contact, etc.) Normally these would be handled as sub-forms within Access, but with the length of these documents (think legal contracts 14+ pages long), I'm forced into Word. Any ideas on a best method of handling this?
Thanks in advance!
"Only the educated are free.
I am using pseale's mail merge method to merge my data with a few documents (faq181-5088). There are two problems I'm running into.
First, I really need to suppress the warning message "Opening this document will run the following SQL command...." The users get a bit skittish when they see message boxes with big words in them.
I've tried using the DisplayAlerts at various points in the Access code, and have also placed it in the Word OnOpen mod in the source document (see snippet below). It had no effect in the Access code, but with it in the Word document, when the process runs the first time, the message is suppressed. However, when the code runs a second and subsequent times, the message comes back, the view has changed from Page Layout to Normal, and the Control toolbox is now visible.
Code:
Set objWordDoc = GetObject(GetStartDirectory() & MergeDocumentFilename, "Word.Document")
objWordDoc.Application.DisplayAlerts = wdAlertsNone
objWordDoc.Application.Visible = True
Second, in some cases I will need to merge a document with customer detail information as well as subsets of data (lists of payments made, dates of contact, etc.) Normally these would be handled as sub-forms within Access, but with the length of these documents (think legal contracts 14+ pages long), I'm forced into Word. Any ideas on a best method of handling this?
Thanks in advance!
"Only the educated are free.