Add an Author-it AfterPublish macro to the Word template

October 5, 2008

You can do some interesting things with AfterPublish macros in Word when you use Author-it. I’ve documented some macros on this site (check the Software > Author-it v5 category on the right). But if you’re not familiar with adding a macro to a Word document, then this can seem really daunting. So here’s how to add an AfterPublish macro to an Author-it Word 2003 template (these steps will be different for Word 2007):

  1. Open the DOT file as a DOT, not a DOC.
  2. Go to Tools > Macro > Macros.
  3. Change the Macros In field to the name of your Author-it template.
  4. Select AfterPublish from the list.
  5. Click Edit.
  6. Go to the end of the AfterPublish macro—the final “End Sub” line.
  7. Paste the macro on the next line after “End Sub”.
  8. Copy the name of the macro (e.g. if the macro starts with “Sub CustomProperty()”, copy only the “CustomProperty” bit—that’s the macro’s name).
  9. Go back to the top of the macro and paste the name of the macro on a separate line BETWEEN Sub AfterPublish() and End Sub for that section (see below).
  10. Save and close the Microsoft Visual Basic window.
  11. Save and close the template.

The top section should look something like this, where each dotted line represents other macros within the AfterPublish macro, and where CustomProperty is the name of the macro you just added in steps 6 to 8.

Sub AfterPublish()
    . . . 
    . . .
End Sub


  1. […] how to Add an Author-it AfterPublish macro to the Word template for a simple set of […]

  2. really a question:
    How would an AfterPublish area be created in a .dot?

  3. I’m not sure what you mean, Pat. All Word templates delivered with the Author-it software have an AfterPublish macro section in them (you can see them using the steps I provided above). If you’ve created a Word template outside Author-it and not based it on an existing Author-it Word template, then you’ll have to create a new macro called ‘AfterPublish’ first, before you can follow the steps above.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: