Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2010, 03:32 AM
Kimberly Kimberly is offline custom toolbar with buttons to open new docs based on templates Windows 7 custom toolbar with buttons to open new docs based on templates Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default


record a macro to create the file and attach the macro to the button
Reply With Quote
  #2  
Old 06-14-2010, 06:51 AM
Brandi Brandi is offline custom toolbar with buttons to open new docs based on templates Windows XP custom toolbar with buttons to open new docs based on templates Office 2003
Novice
custom toolbar with buttons to open new docs based on templates
 
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
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom toolbar with buttons to open new docs based on templates Default Custom Dictionary Based on Document PatrickYork Word 3 04-03-2015 11:19 PM
Dock a custom floating toolbar? itgoeson PowerPoint 0 05-25-2010 08:34 AM
Docs open under formatting toolbars clive Word 0 01-22-2010 06:26 PM
command buttons ronf Excel 0 04-28-2006 08:32 AM
command buttons ronf Excel 0 12-03-2005 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft