
Add an Author-it AfterPublish macro to the Word template
October 5, 2008You 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
Posted in Author-it v5, Word | Tagged macros |
3 comments
Leave a Reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
[…] how to Add an Author-it AfterPublish macro to the Word template for a simple set of […]
really a question:
How would an AfterPublish area be created in a .dot?
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.