inserted page referencing a bookmark

B

bryan

I have inserted a 2nd document to my template and am trying to reference a
bookmark from the template bookmark. I've referenced formfields but, this is
a bookmark.
Template bookmark is FWmark
I insert text to this by:
Dim bmRange As Range
Set bmRange = ActiveDocument.Bookmarks("FWmark").Range
ActiveDocument.AttachedTemplate.AutoTextEntries(strFW).Insert
WHERE:=bmRange, RichText:=True
ActiveDocument.Bookmarks.Add _
Name:="FWmark", _
Range:=bmRange

On the 2nd page I have a bookmark called 'DSFW'
and I tried this ref to no avail:
ref FWmark

How can I reference a bookmark?

Thanks,
Bryan
 
C

Cindy M.

Hi Bryan,
I have inserted a 2nd document to my template and am trying to reference a
bookmark from the template bookmark. I've referenced formfields but, this is
a bookmark.
Template bookmark is FWmark
I insert text to this by:
Dim bmRange As Range
Set bmRange = ActiveDocument.Bookmarks("FWmark").Range
ActiveDocument.AttachedTemplate.AutoTextEntries(strFW).Insert
WHERE:=bmRange, RichText:=True
ActiveDocument.Bookmarks.Add _
Name:="FWmark", _
Range:=bmRange

On the 2nd page I have a bookmark called 'DSFW'
and I tried this ref to no avail:
ref FWmark

How can I reference a bookmark?
I'm trying, but I just can't follow your problem description. What does "DSFW"
have to do with the bookmark you're inserting? What do you get when you create
a REF FIELD (I assume that's what you're doing, and not just typing "ref
FWmark" into the document) then force the update? Is it "empty"? If that's the
case, have you looked at whether the bookmark you're creating is actually
*around* the AutoText entry you've inserted?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
B

bryan

The 'DSFW' is a bookmar on the document I am inserting.
I found a sloution:
I declared strFW as a global.

Thanks,
Bryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top