Add an Author-it AfterPublish macro to the Word templateOctober 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):
- Open the DOT file as a DOT, not a DOC.
- Go to Tools > Macro > Macros.
- Change the Macros In field to the name of your Author-it template.
- Select AfterPublish from the list.
- Click Edit.
- Go to the end of the AfterPublish macro—the final “End Sub” line.
- Paste the macro on the next line after “End Sub”.
- 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).
- 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).
- Save and close the Microsoft Visual Basic window.
- 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() . . . CustomProperty . . . End Sub