Hack 49 Quickly Attach a Workgroup Template![]() ![]() user who knows offhand the location of her Workgroup templates on the network. Word knows where they are, but try attaching one to an existing document, and you get a pop quiz on the subject! Reeducate Word with this hack.In addition to templates stored locally, Word allows you to specify a location for document templates on a network, called the Workgroup templates folder. This feature is especially useful in a corporate environment, where multiple users may share the same set of templates.When you specify a Workgroup templates location (select Tools adds any appropriate tabs to the Templates dialog the next time you choose File aren't as easily integrated into your routine when it comes to attaching them to existing documents.The Templates and Add-Ins dialog (Tools Add-Ins), shown in Figure 5-8, defaults to your local templates folder when you click the Attach button (actually, it goes to the folder you specified for User templates under Tools Options local and Workgroup templates, you're in for a lot of folder browsing. Figure 5-8. If you click the Attach button, Word takes you to the User templates folder![]() 5.6.1 The CodeWord's Options object has a DefaultFilePath property that represents the value assigned to the User templates folder. If you temporarily set this to the Workgroup templates folder, you also change where you end up when you click the Attach button in the Templates and Add-Ins dialog.This hack uses the techniques described in [Hack #63] . Sub AttachWorkGroupTemplate( )The macro ignores the "Automatically update document styles" box in the Templates and Add-ins dialog and updates the styles regardless of the value set in the box. Most corporate users are instructed to update their documents to reflect any changes to the template, but if you'd rather decide manually, remove or comment out the following line: dial.Linkstyles = True
5.6.2 Running the HackPut this macro into the template of your choice [Hack #50] and put a button for it on the Tools menu, right below the Templates and Add-Ins button. Rename the button "Attach Workgroup Templates," or something similarly descriptive. |