View Single Post
 
Old 06-14-2010, 06:51 AM
Brandi Brandi is offline Windows XP Office 2003
Novice
 
Join Date: Jun 2010
Posts: 13
Brandi is on a distinguished road
Default

Quote:
Originally Posted by Kimberly View Post
record a macro to create the file and attach the macro to the button
I recorded the following macro and the last step is giving me an error. I recorded the merging of the data (ABC Merge button) and when I execute the macro it doesn't like that step. It just opens a new document showing the field codes.

Also, how do I attach this macro to a button on a toolbar? I know how to create a new button on a toolbar, but I didn't see a way to assign a macro to it.

Thank you.
Brandi

Sub Petition()
'
' Petition Macro
' Macro recorded 6/14/2010
'
Documents.Add Template:= _
"C:\Bergemann\Forfeiture\WordMailMerge\Petition.do t", NewTemplate:=False, _
DocumentType:=0
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
End Sub
Reply With Quote