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 / March 2005

Tip: Looking for answers? Try searching our database.

Update Template Files - AddIns?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mark - 10 Mar 2005 10:17 GMT
Hi All,

I'm after some advice about the best way to setup some templates and have
them update.

What I would like to do is be able to update a series of template files
after the user has chosen a header (company logo we have more than one) and a
footer (office addresses we have about 10).

The story so far is that I have created a single template using AutoText and
user forms and I can get the template to add headers and footers ok. change
them etc. But it will prompt the user to choose each time they open a
document based on the template.

What I would like to happen is that once user has chosen logo and office
address, is for the template document to be updated so that they are not
prompted again when they open a new document. (Template files to be down
loaded to users PC's)

The thing is that there will be at least 6 or 7 template files and I would
prefer that the choice for headers and footers is only done once and that
they will update all templates regardless of which template they choose first.

I've read some posts and looked on the net for info on AddIns but not really
sure if this is the way to go, or how to set these up.

I know that this a long post and thanks for reading this far.

Any advice welcome
Signature

TIA

Mark

Jonathan West - 10 Mar 2005 11:37 GMT
The way you do this is prompt only the first time, and store the response in
the registry using the SaveSetting command

Then, each subsequrnt time a document is created, check the regsitry entry
using GetSetting, and use the Autotext entry whose name you have stored. You
can have a common entry for all your templates.

You might also want  to provide an "Update details" function to allow the
user to change their details, for instance if they made a mistake first time
round

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

> Hi All,
>
[quoted text clipped - 30 lines]
>
> Any advice welcome
mark - 10 Mar 2005 12:19 GMT
Hi Jonathan,

Thanks for the response.

I'll try it out, I'll have to look up how you do this.
If you have any examples it would save a lot of time for me, if not watch
this space as I'm fairly new to VBA.

TIA

Mark

> The way you do this is prompt only the first time, and store the response in
> the registry using the SaveSetting command
[quoted text clipped - 6 lines]
> user to change their details, for instance if they made a mistake first time
> round
Jonathan West - 10 Mar 2005 12:27 GMT
> Hi Jonathan,
>
[quoted text clipped - 3 lines]
> If you have any examples it would save a lot of time for me, if not watch
> this space as I'm fairly new to VBA.

There are code examples in thw Word VBA Help for GetSetting and SaveSetting.
If you have already got your code to the point where you can produce a
prompt asking which layout to use, you are already 90% of the way there.
Just have your code use GetSetting to retrieve the registry value if
present.

If it's not present, show the prompt and save the user choice.

If the registry value is present, use it to set the layout.

By all means post back here if you get stuck.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 

Charles Kenyon - 10 Mar 2005 13:35 GMT
You might store the information you want in a local AutoText global and use
AutoText fields to insert that information. That way, the same template will
give different results for different users. This would require no vba in the
templates themselves.
Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Hi All,
>
[quoted text clipped - 30 lines]
>
> Any advice welcome

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.