PeterFaulhaber
Sun Jul 02 04:47:02 CDT 2006
Jean-Guy,
than ks for your response. The code Range:=Selection.range is the text.
Instead of the selected text I want to also to put there text. so instead of
selected text in the document I want the text in VBA.
Can you help me?
"Jean-Guy Marcil" wrote:
> Peter Faulhaber was telling us:
> Peter Faulhaber nous racontait que :
>
> > Hello,
> >
> > How, in VBA, can I define an complete AutoText entry in VBA? Name and
> > text in VBA?
> >
> To create an autotext from the currently selected text:
>
> ActiveDocument.AttachedTemplate.AutoTextEntries _
> .Add Name:="MyAutotext", Range:=Selection.Range
>
> to create it in the attached template,
> or to create it in Normal.dot:
>
> NormalTemplate.AutoTextEntries _
> .Add Name:="MyAutotext", Range:=Selection.Range
>
> --
> Salut!
> _______________________________________
> Jean-Guy Marcil - Word MVP
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site:
http://www.word.mvps.org
>
>
>