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 / November 2003

Tip: Looking for answers? Try searching our database.

I need help reading/writing to the registry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pat Adams - 29 Nov 2003 15:51 GMT
Hello.
In Word 2002, I have a macro that should store a person's name, fax number and telephone extension in the registry and another one that should be able to read that registry information into a userform whenever they create new correspondence.

I can't seem to decipher the syntax for doing it.

Could someone provide me with a code sample?

TIA,
Pat
Jonathan West - 29 Nov 2003 17:53 GMT
Hi Pat,

The GetSetting and SaveSetting commands are designed for this sort of thing.
There are code samples in the VBA Help file

Signature

Regards
Jonathan West - Word MVP
http://www.multilinker.com
Please reply to the newsgroup

Hello.
In Word 2002, I have a macro that should store a person's name, fax number
and telephone extension in the registry and another one that should be able
to read that registry information into a userform whenever they create new
correspondence.

I can't seem to decipher the syntax for doing it.

Could someone provide me with a code sample?

TIA,
Pat
Pat Adams - 29 Nov 2003 22:37 GMT
Thanks, Jonathan. It was easier than I thought it should be, but just in
case someone is interested, here is more details.

I designed a fax cover sheet and used userforms to capture not only who the
fax was going to, but who it was from. The company has subsidiaries, so I
needed to set up defaults by user that would write the person's name,
company, phone and fax number and automatically display that information
whenever they started a new fax cover sheet. I also needed to allow them to
change the defaults whenever they needed. My save settings script was like
this:

SaveSettings "MS Word", "Private Templates", "FromName",
FormName.txtFieldName

I read the information with in the initialize event for the userform,

FormName.TxtFieldName = GetSettings("MS Word", "Private Templates",
"FromName")

Thanks,
Pat
> Hi Pat,
>
[quoted text clipped - 13 lines]
> TIA,
> Pat
 
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.