Text Box Defaults Add-In Project for Microsoft Publisher
Microsoft® Publisher 2002
Summary: Describes how to use the Text Box Defaults add-in project for Microsoft Publisher 2002 to enable users to extract the property settings from an existing text box to create new text boxes. Readers should be familiar with Microsoft Visual Basic 6.0. (3 printed pages)
The Text Box Defaults project is a Microsoft Visual Basic® 6.0 project that can be compiled into a Microsoft Publisher 2002 add-in toolbar. This toolbar allows the user to extract property settings from an existing text box and then create new text boxes with those settings.
The project consists of two Microsoft Visual Basic 6.0 files: DefTxtBx.dsr and DefTxtBx.vdp. Compile the project into a dynamic linking library (.dll) and then install it as an add-in for Publisher. Once installed, the Default Text Box toolbar is available in the Publisher application.
This add-in is presented as a Visual Basic project (rather than a compiled .dll) so you can build on and customize the code to suit your specific needs.
The Default Text Box toolbar consists of two buttons: the Set Text Box Defaults button, and the New Text Box Based on Defaults button.
The Set Text Box Defaults button does the following:
- Extracts property settings from the selected text box
- Creates a new text box in the corner of the scratch area
- Applies the copied property settings to this scratch area text box for storage
The New Text Box Based on Defaults button does the following:
- Creates a new text box with the property settings stored in the scratch area text box Each new text box is created in the upper left corner of the active page
Settings extracted and applied to new text boxes include properties of the following objects:
Refer to the project code for the exact properties and settings that are extracted.
The following properties do not get extracted:
- The InsetPen property of the LineFormat object
- The Style property of the LineFormat object, if set to msoLineThickBetweenThin
- The Type property of the FillFormat object, if set to msoFillPicture
- The BorderArt property of the Shape object (this property is only present in Publisher 2003)
To install the add-in once it has been compiled
- Open Microsoft Publisher.
- On the Tools menu, click Add-Ins.
- In the COM Add-Ins dialog box, click Add. Navigate to the location of the add-in, select it, and click OK. By default, Publisher looks in the following location: Document Settings/username/Application Data/Microsoft/Addins.
- Click OK.
To create a new text box using the Default Text Box toolbar
- Select the text box whose settings you want to copy.
- Click the Set Text Box Defaults button.
- Click the New Text Box Based on Defaults button. A new text box with the copied property settings is created in the upper left corner of the active page.