Re: AutoText entry not in Normal.dot

From: Jay Freedman (jay.freedman_at_verizon.net)
Date: 12/20/04


Date: Mon, 20 Dec 2004 11:33:08 -0500

Luc Benninger wrote:
> I have a global template (myDot.dot) with following VBA code in it to
> create a new AutoText entry. This new entry should not be saved in the
> Normal.dot but in the myDot.dot:
>
> CustomizationContext = ThisDocument
> Selection.CreateAutoTextEntry "AT_Label", "AT_Category"
>
> But it seems that the CustomizationContext instruction has no
> influence! The entry is still saved in Normal.dot.
>
> Any hints?
> Thanks a lot, Luc

Hi Luc,

"ThisDocument" is the wrong place to point to. Instead, use
   CustomizationContext = ActiveDocument.AttachedTemplate

See http://word.mvps.org/faqs/macrosvba/AddMenu.htm for an example.

-- 
Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org


Relevant Pages

  • Re: Clear entries from "Recently used templates" pane?
    ... the recent lists are there. ... Luc Sanders ... How can I remove an entry on the "Recently used templates" section of the ... deleted template that continues to be displayed. ...
    (microsoft.public.powerpoint)
  • Re: Clear entries from "Recently used templates" pane?
    ... Many thanks Luc, that is exactly what I was after. ... the recent lists are there. ... How can I remove an entry on the "Recently used templates" section of the ... deleted template that continues to be displayed. ...
    (microsoft.public.powerpoint)