#1
|
|||
|
|||
Word 2003 > close > it asks to save a global template
Hi
I try to deploy macro's and a customized toolbar from a central location. I followed the steps described on this page:http://office.microsoft.com/en-us/word-help/deploy-your-word-macros-from-a-central-location-HA001087294.aspx It works, but there is one problem: When you close Word it asks the enduser if he wants to save the changes made to that global template. Yet the enduser didn't change anything. Does anyone knows why this can be happening? Is it possible to add a macro to that global template that prevents that this question is asked (automatic choise not to save the changes into the global template)? Of course the enduser has to be able to make changes to his own templates (e.g. normal.dot). Thx for hints Best regards Tom |
#2
|
||||
|
||||
Hi Tom,
That message usually applies to changes to Word's 'Normal' template. Even then, whether a particular user gets the warning depends on whether they have the 'prompt to save Normal template' option checked (under Tools|Options|Save).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Hi Paul
The message contains the name of the global template, so this shouldn't have anything to do with the normal template. Best regards Tom |
#4
|
||||
|
||||
Hi Tom,
Are you sure neither one of the macros in the global template, nor a user, is making changes to the template?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Hi Paul
You can find the template in attachment. The users are not making changes to the global template. (This template has only a toolbar with shortcuts to macro's that open other templates) Best regards Tom |
#6
|
||||
|
||||
Hi Tom,
I don't see anything obvious. Try adding the following code to the template's 'ThisDocument' module: Code:
Private Sub Document_Close() Application.Templates("Hoofdsjabloon").Saved = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 05-05-2011 at 12:39 AM. Reason: Fixed code tags |
#7
|
|||
|
|||
Hey
I did that, but when I try to save those changes, I now get an error. I'm using a dutch version of Word, so I'll literally translate it: "the asked member is not available in this collection" I also tried this code: Private Sub Document_close() activedocument.attachedtemplate.saved=true End sub and Private Sub Document_close() Thisdocument.saved=true End sub But they don't resolve the problem either. I don't understand why Word try to save changes, since no one is changing something. Best regards Tom |
#8
|
||||
|
||||
Hi Tom,
It seems to me you're not so much using this template to distribute macros as to create an altenative way of creating a new document based on a template. You could probably achieve much the same result using something based on: Application.Dialogs(wdDialogFileNew).Show from the users' Normal.dot(m) template. Be that as it may, it might be useful if you can track down the point at which your global template's state is changing to unsaved. Here's some code to try: Code:
Sub Test() Dim Doc As Document For Each Doc In Documents MsgBox Doc.AttachedTemplate.Name & vbTab & Doc.AttachedTemplate.Saved Next Dim Tmplt As Template For Each Tmplt In Templates MsgBox Tmplt.Name & vbTab & Tmplt.Saved Next End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
||||
|
||||
Hi Tom,
I came across the following link, which shows how you can modify Word's QAT and the Windows Registry to manage the creation of new files from templates. You might find that an improvement on what you now have. See: http://word.mvps.org/FAQs/Customizat...istry2007.html You could roll out a VisualBasic script file that applies the changes to all users' PCs. See, for example: http://support.microsoft.com/kb/256986
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
Sorry macropod it took so long before I replied to your posts.
I'm working on several projects at the same time. Your suggestion about using Application.Dialogs(wdDialogFileNew).Show is interesting, but no option. Now we're trying implement a global template because the current way of working (with toolbar and macro's that are copied from a document to all normal.dots) takes to much time. So we don't want to modify normal.dot. Unfortunately we're still using 2003 and we want change before next year, so manupilating QAT is also not an option. Since we are also using application virtualization (Citrix XenApp) it could also become very complicated. So I'm a bit stuck with the solution of the global template. I tried your code, it says "true" for all templates. Does this mean changes had been made to all of them? Best regards Tom |
#11
|
||||
|
||||
Hi Tom,
The 'Yes' confirms that no template changes have been made. That's a good thing, as far as it goes. But it still leaves me wondering why the template update prompt occurs. Since you're still using Office 2003 (my bad referring you to an Office 2007 solution), you should be able to set up a similar arrangement for that.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2003 slow to open/close | HAWJOHN | Word | 1 | 04-05-2011 06:47 AM |
Global template | ryalls3857 | Word | 1 | 12-27-2010 05:45 PM |
2003 word template help??? | gawd89108 | Word | 1 | 03-08-2010 05:58 PM |
Word 2003: Do you want to save changes always popping up | aedwards | Word | 0 | 02-23-2006 02:14 PM |
Suppress "do you want to save?" dialog on close | rnstewart | Excel | 2 | 12-28-2005 04:30 PM |