Autotextentry

G

G. Hagg

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
 
G

Greg Maxey

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

G. Hagg

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
 
Top