Inserting AutoText from a Global Template 
Author Message
 Inserting AutoText from a Global Template

Hi Judy,

Try using something like the following:

Dim oTemp As Template
Set oTemp = Word.Templates(Options.DefaultFilePath(wdStartupPath) &
"\CompanyGlobal.dot")
oTemp.AutoTextEntries("Logo Black 1""").Insert _
    Where:=Selection.Range

HTH


I've created a global template (CompanyGlobal) that contains different
versions of our new company logo as AutoText entries.  In a particular
document template (not global), I need to create a macro that finds the
existing graphic in the footer and replaces it with a logo from
CompanyGlobal.

What command do I use in place of ActiveDocument.AttachedTemplate?

 ActiveDocument.AttachedTemplate.AutoTextEntries("Logo Black 1"""). _
        Insert Where:=Selection.Range



Sat, 23 Apr 2005 04:01:24 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Programmatically accessing AutoText in a Global template

2. Refering to Functions and Subs held in one global template from another global template

3. Macro that inserts Autotext loses styles of Autotext entry

4. Problem with format on insert autotext, and in inserting elements with form fields

5. Global.MPT and Enterprise Global Template

6. Is it possible to trigger an event when a template is loaded as a global template

7. Updating AutoText in template footer

8. Using Autotext in Headers in Templates: Doesn't update

9. Normal.dot template & AutoText

10. Combo Box listing Autotext Entries from Add-In Template

11. Inserting AutoText in Header and retaining formatting

12. Insert autotext with VBa

 

 
Powered by phpBB® Forum Software