If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Cannot get field values
I have set up an Mail merge document. But, I have to manually click on
View Merge Data A Button to get values. I used the following macro code to get execute mailmerge. If ActiveDocument.MailMerge.State = wdMainAndDataSource Then ActiveDocument.MailMerge.Execute End If |
#2
|
|||
|
|||
Cannot get field values
Maybe you need:
If ActiveDocument.MailMerge.State = wdMainAndDataSource Then ActiveDocument.MailMerge.Destination = wdSendToNewDocument ActiveDocument.MailMerge.Execute End If I am not sure where it goes if you don't specify a destination. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Crazy Macros" wrote in message oups.com... I have set up an Mail merge document. But, I have to manually click on View Merge Data A Button to get values. I used the following macro code to get execute mailmerge. If ActiveDocument.MailMerge.State = wdMainAndDataSource Then ActiveDocument.MailMerge.Execute End If |
#3
|
|||
|
|||
Cannot get field values
It doesn't work. Is there a way to debug. I can't even display MsgBox.
|
#4
|
|||
|
|||
Cannot get field values
Doug,
It doesn't work. Is there a way to debug this. I can't even use MsgBox. Please advice. |
#5
|
|||
|
|||
Cannot get field values
I would suggest that you first get the merge working by executing it using
the user interface rather than jumping straight in with a macro. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Crazy Macros" wrote in message oups.com... Doug, It doesn't work. Is there a way to debug this. I can't even use MsgBox. Please advice. |
#6
|
|||
|
|||
Cannot get field values
I got the merge working with UI. I need help to get it automated.
|
#7
|
|||
|
|||
Cannot get field values
Can you get the msgbox function to work?
For example, if you run a macro with the command msgbox "Hello World." you should see a message box with that message in it. You are going to have to sort that out before trying anything else. Why do you want to automate the mailmerge? Are you trying to do it from some other application? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Crazy Macros" wrote in message oups.com... I got the merge working with UI. I need help to get it automated. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Record Update | Michelle | Using Forms | 5 | October 28th, 2004 07:59 AM |
Autonumber | Ally H. | General Discussion | 7 | August 27th, 2004 04:51 PM |
Multiple Values in a Field | Rush | General Discussion | 4 | July 9th, 2004 07:43 PM |
NUMBERING the pages | Bob | New Users | 7 | June 14th, 2004 12:20 AM |
Supress blank lines in DOCPROPERTY field | Mary | Formatting Long Documents | 10 | May 25th, 2004 07:27 PM |