Results 1 to 15 of 15
  1. #1
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving normal.dot (XP/2002)

    I have two templates that are automatically loaded when you launch Word, these templates don't actually make any changes but they do give access to some macros etc. The problem is i've got a shared normal.dot which is read only and when you close down it asks you if you want to save changes to normal (of course this isn't possible) so i receive an error telling me so. There aren't actually any changes made to the normal the only thing that takes place is that it loads these two templates. Is there anyway i can amend the settings to stop this maybe by turning off the automatic saving of normal or something like that/?

    cheers any offers appreciated

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving normal.dot (XP/2002)

    Do the templates you load modify or create toolbars? That would count as a change.

    You can tell Word that Normal.dot doesn't need to be saved any more by executing the VBA instruction Templates("Normal.dot").Saved = True, but you will have to find out where and when to do so.

  3. #3
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving normal.dot (XP/2002)

    Yes these templates modify one of the toolbars but its always the same change and even if i do save these changes to the normal the next time i load it, it claims changes have been made to the normal.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving normal.dot (XP/2002)

    It doesn't matter that it's the same change each time. Word perceives that the toolbar is modified, and therefore Normal.dot too.

    You should either set the CustomizationContext for the toolbar changes to the template that performs these changes, or use the instruction I posted to fool Word into thinking that Normal.dot hasn't been changed.

  5. #5
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving normal.dot (XP/2002)

    Okay i've had a look at these options. The one from your first post just bascially tells word to save the changes to normal without prompting, which won't work as the normal is protected and changes can't be made. And i have to admit the one lost me!???

    Just another thought i've had, is it possible to create something along the lines of; When word closes do not save normal. Perhaps a macro that says AutoClose save=false something like that, i've been reading loads on info about this and am certain there's a solution to my problem

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving normal.dot (XP/2002)

    Hi Chris,

    You may have misread the suggestion in my first post. The line of code is

    <big>Templates("Normal.dot").Saved = True</big>

    and not

    <big>Templates("Normal.dot").Save</big>

    The first one tells Word that Normal.dot has already been saved (even if it hasn't), so it doesn't need to do so any more. The second one would attempt to save Normal.dot, which is precisely what you don't want.

  7. #7
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving normal.dot (XP/2002)

    Right if i go into Visual Basic and look at the properties of This document (normal.dot) there are a list of properties that i can see including Saved this i've set to true and it automatically saves normal without prompting (even though this is turned on in options) there is no sign of another option called Save. i reckon i must be well off the track here from what i'm supposed to be doing

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving normal.dot (XP/2002)

    Are you sure that setting Saved to True really saves Normal.dot? I tried the following:

    - Added a button to a toolbar.
    - Activated the Visual Basic Editor
    - Inspected the Saved property of Normal.dot. It was False, indicating that the template had been modified.
    - Set the Saved property to True. There was no disk activity.
    - Quit the Visual Basic Editor and Word.
    - Checked the modification date/time of Normal.dot in Windows Explorer. It was a date in September, when I last modified it intentionally.
    - Started Word again. The toolbar was back to its original state, the button I had added was not displayed.

    Furthermore, what I posted were Visual Basic instructions. Saved is a property, you can see it in the Properties window. Save is not a property, but a method, it does something.

  9. #9
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving normal.dot (XP/2002)

    Yeah that's what i did, well i didn't put on a button i just decided to check the modified time and when i close down word, it saves a copy of the normal and the date modified time becomes the current one. Well i mean it saves a copy when i close down

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving normal.dot (XP/2002)

    If I understand correctly, you set Saved to True, then quit Word and Normal.dot is saved, or a copy is saved. That would imply that there is code in the Document_Close event (or perhaps in the application level Quit event ) in one of the loaded templates that modifies Normal.dot again.

  11. #11
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving normal.dot (XP/2002)

    That's exactly what i've done and the normal saves itself on exit. I really don't think either of these templates would have such a thing inside them literally all they seem to do is
    1) Adds an entry into the Help menu
    2) Contains a few autotext entries that i now have access do

    I can't see any reason why either of them would also have something about saving Normal

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving normal.dot (XP/2002)

    One more thing to try; after that, I'm stumped. Open the code that sets a menu or toolbar item. Insert the following instruction immediately above this code, before any commandbar customization:

    CustomizationContext = MacroContainer

    This should store the modification in the template instead of in Normal.dot.

    (Although we already know which template is causing this, you might take a look at <!post=Systematic Approach to Behavioral Problems in Word (97/2000),197827>Systematic Approach to Behavioral Problems in Word (97/2000)<!/post>, in particular Step 3)

  13. #13
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving normal.dot (XP/2002)

    I'll have a look at that, see if any of it applies. Thanks for all your help anyway Hans it has been much appreciated

  14. #14
    Lounger
    Join Date
    Dec 2002
    Location
    Edinburgh, Scotland
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving normal.dot (XP/2002)

    Okay i've tried all of these things now, and unfortunately nothing has worked.

    Back to the drawing board, i refuse to let this beat me, it seems like a relatively simple thing i refuse to believe its impossible

  15. #15
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving normal.dot (XP/2002)

    If you like, and if the code in the two templates is not proprietary, you could post them (in a zip file), to let Loungers experiment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •