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 / February 2006

Tip: Looking for answers? Try searching our database.

Variable Use in Multiple Documents

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Denise - 16 Feb 2006 20:12 GMT
I have several documents that list the same information, such as the current
amount for monthly dues to our cabana club.  Every time the dues change,
someone has to edit each document to change the amount.  I would like to
create a variable and set the value in one place, but use the variable in
multiple documents.  It looks like I might be able to do this with a doc
variable.  But I don't quite understand how to do it.  I see thread with the
subject Set Variable in VBA, use in document, dated 11/29/2005, which talks
about it.  My problem is I don't know where to create the variable in the
first place.  Do I do it right in my Word document, or do I do it somewhere
else?  Also, how do I make it so the variable can be used in multiple
documents?
Signature

Thanks for the help

Jay Freedman - 16 Feb 2006 21:28 GMT
> I have several documents that list the same information, such as the
> current amount for monthly dues to our cabana club.  Every time the
[quoted text clipped - 7 lines]
> it right in my Word document, or do I do it somewhere else?  Also,
> how do I make it so the variable can be used in multiple documents?

Hi Denise,

A document variable isn't likely to help you in this situation. Document
variables are saved in the file of the document where they're set, and they
aren't (easily) available to other documents.

What would probably serve you better is a separate document containing the
information. You can use one document to hold a bunch of different values.
Insert a bookmark to surround each value that you want to use elsewhere. For
example, let's say that for now the content of the document is just one
line,

   Cabana_dues      58.50

Use the Insert > Bookmark dialog to insert a bookmark named Cabana_dues to
enclose just the 58.80 (the first part is there to identify the line for
whoever has to enter new values).

In any other document where you need that information, use the Insert > File
dialog. Choose the document that contains the data, click the Range button,
enter the name of the bookmark (Cabana_dues), and click the down arrow next
to the Insert button and select Insert As Link. That creates a field whose
value is the content of the bookmark. If you change the value inside the
bookmark in the data document, then come back to the field and update it
(select it and press F9), the displayed value will change to the new one.

A variation is that you can use an Excel spreadsheet with named ranges to
hold the values instead of a Word document with bookmarks. The rest of the
procedure is the same. For small amounts of data, though, there's little
practical difference.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Denise - 23 Feb 2006 15:24 GMT
Thanks Jay.  I also noticed that if I do a select all before I do the F9, it
will update all the variables in the document.

I have a follow-up question, though.  I want to explain to people what I've
done, but don't want the explanation to print out with the document.  Can I
put a paragraph at the top of my document that won't get printed out when the
document is printed?  
Signature

Thanks for the help

> > I have several documents that list the same information, such as the
> > current amount for monthly dues to our cabana club.  Every time the
[quoted text clipped - 38 lines]
> procedure is the same. For small amounts of data, though, there's little
> practical difference.
Jay Freedman - 23 Feb 2006 16:02 GMT
> Thanks Jay.  I also noticed that if I do a select all before I do the
> F9, it will update all the variables in the document.
[quoted text clipped - 3 lines]
> document.  Can I put a paragraph at the top of my document that won't
> get printed out when the document is printed?

Try one of the methods Greg Maxey describes at
http://gregmaxey.mvps.org/document_user_instructions.htm.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

 
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.