Quote:
Originally Posted by Kimberly
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