global variables helps?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

i have a variables call company address, and it is used in several word
templates. everytime i update the company address, i have to update every
word template, which is very annoying.
so i just wonder that is that way i can store this varialbe in central file
or module , then i only need update once.

Cheers

Nick
 
Hi =?Utf-8?B?Tmljaw==?=,
i have a variables call company address, and it is used in several word
templates. everytime i update the company address, i have to update every
word template, which is very annoying.
so i just wonder that is that way i can store this varialbe in central file
or module , then i only need update once.
Certainly you can store it in an external file. If you're using Word VBA, a
very simple technique is to store it in INI format, then use
System.PrivateProfileString to access the information.

An example of INI file content:

[Global info]
CompanyAddress = "The information here"

An INI file is a plain text file (you can create it using Notepad) with the
file extension .ini

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 :-)
 

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

Back
Top