Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Brian
 
Posts: n/a
Default Cross Referencing Bookmarks

Hello,

I have an application (built in PowerBuilder) that does a mail merge
using Word 2003. I am using bookmarks to insert things like first
name, last name, address, etc. This works fine if I only want to merge
each bookmark once. After reading many of these posts I discovered
that what I want to do is then cross reference that bookmark any number
of times.

However, I am unable to get the bookmarks to print anytime other than
the first. I have a bookmark named fname. My original bookmark prints
fine as "Charlie". However, when I cross reference to fname and run
the merge, my second instance displays "fname". I have tried the ctrl
+ A and F9 trick and right clicked on the new reference and clicked
update, and still no luck.

Is the problem that Word cannot cross reference to a value that is
programmatically set? I have clicked tools | options | print | update
fields, but no luck.

Any ideas?

Thanks,
Brian

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Cross Referencing Bookmarks

Hi Brian,

I have an application (built in PowerBuilder) that does a mail merge
using Word 2003. I am using bookmarks to insert things like first
name, last name, address, etc. This works fine if I only want to merge
each bookmark once. After reading many of these posts I discovered
that what I want to do is then cross reference that bookmark any number
of times.

However, I am unable to get the bookmarks to print anytime other than
the first.

Bookmarks are removed during the mail merge execution; you really can't
use them in mail merge as you propose. What you need to do is insert the
merge field as many times as you need to display it in the merge result.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Brian
 
Posts: n/a
Default Cross Referencing Bookmarks

Hi Cindy,

Thanks for your reply. I guess I used the word mailmerge a bit
casually. I have an app that uses an oleobject that opens a word doc
behind the scenes and looks for specific bookmarks to update with
values. The bookmarks themselves work fine, but I am unable to cross
reference them elsewhere in the doc. Sounds like bookmarks are not the
way to go.

Thanks,
Brian

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Cross Referencing Bookmarks

Hi Brian,

I guess I used the word mailmerge a bit
casually. I have an app that uses an oleobject that opens a word doc
behind the scenes and looks for specific bookmarks to update with
values. The bookmarks themselves work fine, but I am unable to cross
reference them elsewhere in the doc. Sounds like bookmarks are not the
way to go.

Bookmarks should be fine, it's likely you're not extending them around
the text you're inserting, so there's nothing "in" them for the
cross-reference to display. Roughly, you should be doing this (VBA code):

Dim doc as Word.Document
Dim rng as Word.Range
Dim sBkmName as String

Set doc = ActiveDocument
sBkmName = "Bookmark1"
If doc.Bookmarks.Exists(sBkmName) Then
Set rng = doc.Bookmarks(sBkmName).Range
rng.Text = "some text"
doc.Bookmarks.Add Range:=rng, Name:=sBkmName
End If

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tech_Tav Cross Referencing mad dog Microsoft Word Help 2 April 13th 06 02:33 PM
How do I get chapter numbering to appear in cross referencing? ZoeElizabeth Microsoft Word Help 10 March 6th 06 01:31 PM
Cross Referencing to Caption Paige Harrison Microsoft Word Help 1 February 28th 06 05:30 PM
Cross referencing number only from automatic numbering termiflyer Microsoft Word Help 1 August 19th 05 10:34 PM
problem w/ cross referencing in word 97 [email protected] Formatting Long Documents 3 May 24th 05 11:19 AM


All times are GMT +1. The time now is 08:46 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"