-
Solved: Automating Mail Merge: Input required
I tried the 'Automating Mail Merge' on a mail merge document as instructed from the VBA Knowledgebase. It did run but not quite automatically. Upon opening the document, an SQL dialogue box concerning the data file comes up and requires input before the merge can begin.
I have tried to create a macro to automate the opening, merging and saving of a series of documents in one fell swoop. The aforementioned dialog box never comes up, but then the macro always hangs up just after the mailmerge command.
Is there anyway to bypass the required input or deal with in in the macro itself?
-
It sounds like you're running your mail merge against a query that has an expression in it. Is this true?
Joanne
-
The data for the main merge doc is in the form of a .txt file with semicolons separating the fields; there is only one data set per file so only one merged document is created. This works fine except for the darn dialogue box.
This is the text of the dialogue box:
"Opening this document will run the following SQL Command:
SELECT*FROM C:\Documents and Settings\.......\MailForm1.txt
Data from your database will be placed in the document. Do you want to continue?
Yes/No"
-
Joanne
-
Thank you Joanne. The KB did the trick. Without the SQL alert, my macro opens, merges, edits and saves a series of documents without input other than starting the macro.
-
Hi, Don, JO. Do we need to mark our KB entry, do you think? I mean...will others have the same problem or is it just Don's issue?
I'll mark this solved meanwhile.
-
Hi Dreamboat!
I think a KB article would be good for us... I'm sure it's not just this one isolated instance (or they wouldn't have a KB on MS I think
Glad to have helped Don!
Joanne
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules