Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

cross referencing to insert txt in multiple places

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michelle - 03 Jan 2006 04:29 GMT
I know that this question has been asked before and I have tried the answers
given but I still cannot get my cross references to work!

I have set up a UserForm following the instructions in MVPS Create a
UserForm. my bookmarks and textboxes work fine.  Then, to get the same info
in one bookmark to appear elsewhere in the document I insert a cross
reference as follows;
Ref Type: Bookmark
Insert Ref To: Bookmark Text
For which bookmark:  I select the name of the bookmark (ContractorShortName)

But all that happens is Word puts the reference data in as {REF
ContractorShortName} instead of the actual text entered eg. Smithers & Sons.

I am only begining, just following the responses to other peoples questions.
Can someone please tell me what I am doing wrong?  I am using XP.
Signature

Michelle

Doug Robbins - Word MVP - 03 Jan 2006 05:11 GMT
Press Alt+F9 to toggle off the display of the field codes.

Alternatively, instead of using the code to insert the data into the .Range
of bookmarks, use

With ActiveDocument
   .Variables("varContractorShortName").Value = txtContractorShortName
   .Range.Fields.Update
End With

in the user form and in the template insert { DOCVARIABLE
varContractorShortName } fields in each location where you want that data to
appear.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I know that this question has been asked before and I have tried the
>answers
[quoted text clipped - 17 lines]
> questions.
> Can someone please tell me what I am doing wrong?  I am using XP.
Michelle - 04 Jan 2006 02:07 GMT
Many thanks Doug, you have saved the day!

It didn't work with the DocVariable field but it did when I inserted a Ref
field instead, but I had to leave the lines you provided in visual basic.  
The Ref field wouldn't work when I took those lines out.

I don't know why it works but it does, so thank you.  You have saved my
computer from a short flight out of a small window!

Michelle

Signature

Michelle

> Press Alt+F9 to toggle off the display of the field codes.
>
[quoted text clipped - 31 lines]
> > questions.
> > Can someone please tell me what I am doing wrong?  I am using XP.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.