• Prevent Normal.dot from being saved

    Author
    Topic
    #467750

    Word 2003

    I have the dreaded “normal.dot is always saved when Word is closed” disease !

    I have tried everything I can find to stop this – add-ins, settings etc etc but it persists. I think it is a remnant of the uninstallation of a pdf add-in.

    Anyway, it disrupts synchronisation between 2 PCs (long story) and I would like to take a sledge-hammer approach rather than spending any more time in diagnosis as I really don’t want any changes made to normal.dot by this machine.

    I have been trying to write an auto-close sub in VBA but cannot find the correct syntax – any help gratefully received.

    Viewing 3 reply threads
    Author
    Replies
    • #1215455

      Should have said I got as far as this:

      Private Sub Auto_Exit()
      NormalTemplate.Saved (True)
      End Sub

      Curiously, after writing this and closing Word, normal is NOT saved (good) but the next time I open and close Word normal IS saved (bad).

      How can I make this take effect every time I exit from Word ?

      Thanks

      • #1215464

        Should have said I got as far as this:

        Private Sub Auto_Exit()
        NormalTemplate.Saved (True)
        End Sub

        To make that work, I think you need these revisions (however, I have not tested it):

        Code:
        Sub AutoExit()
        ' Flag Normal.dot as saved so Word does not prompt to save it again
        NormalTemplate.Saved = True
        End Sub

        == Edit ==

        After a quick search, it appears that some people place this code in an AutoClose macro, saying that Word prompts to save Normal.dot before the AutoExit macro runs. This would mean that if you make any changes to Normal.dot (e.g., add an AutoText entry, a formatted AutoCorrect entry, or change a style in Normal.dot), you will need to save it manually before you close any documents.

    • #1215471

      Thanks – you were right, it had to be AutoClose

      Sub AutoClose()
      ‘ Flag Normal.dot as saved so Word does not prompt to save it again
      NormalTemplate.Saved = True
      End Sub

      Now to add an if statement so it only does this on the delinquent PC, and I can edit normal.dot on the others without going though hoops 🙂

    • #1215473

      So here is the whole thing, working exactly as needed- the saving of normal.dot is suppressed on PCs where the named file exists – again my thanks:

      Public Function FileExists(Fname As String) As Boolean

      If Fname = “” Or Right(Fname, 1) = “” Then
      FileExists = False: Exit Function
      End If

      FileExists = (Dir(Fname) “”)

      End Function

      Sub AutoClose()

      ‘ Flag Normal.dot as saved so Word does not prompt to save it again
      ‘ As long as the named file exists

      If FileExists(“filename.xxx”) Then NormalTemplate.Saved = True

      End Sub

    • #1215517

      Seems to me it would be a whole lot simpler to mark the file as read-only, via Windows Explorer.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    Viewing 3 reply threads
    Reply To: Prevent Normal.dot from being saved

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: