Microsoft Publisher Macros

Note: Microsoft Publisher and Microsoft Access have no Trust access to the VBA project model object option. What is a macro, who makes them, and what is the. Add text to a shape. Publisher for Microsoft 365 Publisher 2019 Publisher 2016 Publisher 2013 Publisher 2010 More. In your publication, click a shape, or click Insert Shape to add a new shape to the publication. Type the text you want inside the shape.

-->

This reference contains conceptual overviews, programming tasks, samples, and references to guide you in developing solutions based on Publisher.

Note

Interested in developing solutions that extend the Office experience across multiple platforms? Check out the new Office Add-ins model. Vmware fusion 11 mac catalina.

Use the table of contents in the navigation on the left to view the topics in the following sections:

  • Concepts: Provides important concepts for developing custom Publisher solutions.

  • Object model reference: Provides reference materials for the Publisher object model.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.

On my post about how to add the file name and path to a header or footer, Steven asks a good question:

“Is there a way to save this into a shortcut for future use?”

I’ve found a few ways to do this:

  • You can save the field code in your Header gallery or your Footer gallery.
  • You can save the field code as AutoText.
  • You can create a macro that will insert the correct field, and you can add a button that runs the macro on the Quick Access Toolbar.

In each case, it will look like you’re saving your document’s name as a shortcut, but really you’re saving the field code. When you press ALT+F9, the field code looks like this.

Note: This is a really long post–so if you know you want the button, skip ahead to the section on creating a macro.

Option 1: The Header or Footer gallery

After you insert the FileName field into your header or footer, select the field (it will say the name of your document), but don’t select the paragraph mark.

Click Header or Footer, and then click Save Selection to Header Gallery or Save Selection to Footer Gallery.

The upside? It’s easy to do. The downside? You need to scroll to the bottom to find your new gallery entry.

Option 2: The Filename field as AutoText

This begins the same way: After you insert the FileName field into your header or footer, select the field (it will say the name of your document), but don’t select the paragraph mark.

On the Insert tab, in the Text group, click Quick Parts, and then click Save Selection to Quick Part Gallery.

In the dialog box that opens, type a name that you’ll remember, and then in the Gallery list, click AutoText. (You can choose any gallery, but AutoText seems to be a shorter shortcut.)

The upside? It’s also easy to do. The downside? You still need to click Quick Parts and point to AutoText and find your gallery entry–which isn’t that much faster than inserting the field.

Option 3: Create a macro

You can use this procedure to create other shortcut buttons, too.

Double-click in the header area or the footer area.*

On the View tab, in the Macros group, click Macros and then click Record Macro.

Type a name (without any spaces) and then click the Button button.

In the Word Options dialog box, click the name of your macro, and then click Add to add it to the Quick Access Toolbar.

Led player 6.0 for mac

If you want to change how the button looks, click Modify and choose a new button.

Click OK.

Now, insert the FileName field.

Then click the View tab again, click Macros, and click Stop Recording.

When you click the new button on the Quick Access Toolbar, Word will insert the FileName field.

Enjoy your shortcuts!

— Joannie Stangeland

* If the double-click action isn’t working for you, you can click Insert, click Header or Footer, and then click Edit Header or Edit Footer.

Related Post