Using word2003, i have an autotext extry saved to an attached template
consisting of a table with links.

How can i insert this autotext extry into my document with vba code.

Thanks

Re: Autotextentry by Greg

Greg
Thu Sep 29 20:25:23 CDT 2005

Something like:
Sub test()
Dim myRng As Range

Set myRng = Selection.Range
ActiveDocument.AttachedTemplate.AutoTextEntries("Checked Box").Insert myRng

End Sub

Where you replace "Checked Box" with the name of your AT entry.

"G. Hagg" <ghagg@bellsouth.net> wrote in message
news:ph0%e.11031$yl.567@bignews1.bellsouth.net...
> Using word2003, i have an autotext extry saved to an attached template
> consisting of a table with links.
>
> How can i insert this autotext extry into my document with vba code.
>
> Thanks
>



Re: Autotextentry by G

G
Thu Sep 29 20:53:23 CDT 2005

Thanks Greg

I get a runtime error 5941, the requested member of the collection does not
exist. My autotext entry contains a table with bookmark links, not sure if
this is the problem?

gh


"Greg Maxey" <gmaxey@MikeVictorPapaSierra.org> wrote in message
news:%23n12W3VxFHA.2540@TK2MSFTNGP09.phx.gbl...
> Something like:
> Sub test()
> Dim myRng As Range
>
> Set myRng = Selection.Range
> ActiveDocument.AttachedTemplate.AutoTextEntries("Checked Box").Insert
> myRng
>
> End Sub
>
> Where you replace "Checked Box" with the name of your AT entry.
>
> "G. Hagg" <ghagg@bellsouth.net> wrote in message
> news:ph0%e.11031$yl.567@bignews1.bellsouth.net...
>> Using word2003, i have an autotext extry saved to an attached template
>> consisting of a table with links.
>>
>> How can i insert this autotext extry into my document with vba code.
>>
>> Thanks
>>
>
>