Select a bookmark after an AutoText item is entered?

Select a bookmark after an AutoText item is entered?

Post by Charles Wa » Tue, 20 Jan 2004 11:22:52


Hello,

I have a number of AutoText entries that have bookmarks contained in
them.

Ideally, I'd like to just type the AutoText "Entry Name" in the
document, press Enter (as one would normally enter AutoText), and
then have the cursor go back and select the first Bookmark in the
AutoText entry.

Any ideas?

TIA
 
 
 

Select a bookmark after an AutoText item is entered?

Post by Word Heret » Tue, 20 Jan 2004 16:34:50

G'day Charles Warner < XXXX@XXXXX.COM >,

no can do unless you use a button to do the insert and tie the code to
an explicit macro that does something like this (pseudo code)

Get selection range
insert THE autotext entry into the .range
find first bookmark in the .range (.range.bookmarks(1))

Word cheats and calculates most objects, despite MS's own warnings
against doing so. Thus, (1) is always the first one range wise in the
space allocated.


Steve Hudson
Word Heretic Sydney Australia
Tricky stuff with Word or words

Email: WordHeretic at tpg.com.au


Charles Warner was spinning this yarn: