Creating a Publisher Add-in

The ActiveDocument object always returns the document that goes with the Application object.  This is normally the first document opened or created.  This means that even if you create another document through File > New, and have that window active, ActiveDocument will refer to the original one.  This means that add-ins can only use ActiveDocument with single instances.  Publisher 2003 introduced the Documents collection - Publisher 2002 had no awareness of multiple instances.

Some systems cause errors when ActiveDocument is used when the original instance has been closed (e.g. Start Publisher > New Publication > File > New > Close Original document, leaving the second publication open) - as ActiveDocument still points to the first document, which has now been closed.

Back to the tutorial