Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save normal template error (Word2000/2003)

    Edited by HansV to provide link to post - see <!help=19>Help 19<!/help>

    See <post#=395273>post 395273</post#>
    This solution works fine, but could it be customised so that it does not close down MS Word ever time I close down a document?
    Please help.
    Regards

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

    Re: Save normal template error (Word2000/2003)

    It would have been better if you had posted this question in the thread you refer to. Where have you placed the code JanB provided you with?

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save normal template error (Word2000/2003)

    I pasted the code in the Normal.dot This document section.
    Regards

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

    Re: Save normal template error (Word2000/2003)

    OK, and what is the name of the procedure (it comes immediately after Sub)?

  5. #5
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save normal template error (Word2000/2003)

    This is exactly as it is:
    Private Sub Document_Close()
    Set aDoc = NormalTemplate.OpenAsDocument
    On Error Resume Next
    With aDoc
    .SaveAs FileName:="D:NormalTemplateNormalBackupNormalBacku p.dot"
    .Close SaveChanges:=wdDoNotSaveChanges
    End With
    End Sub

    Regards

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

    Re: Save normal template error (Word2000/2003)

    This event procedure will save a copy of Normal.dot each time you close a document based on Normal.dot (i.e. a standard document.) that is not what you want. Remove this procedure, and copy the following code into a standard module in Normal.dot (the type you create by selecting Insert | Module):

    Sub AutoExit()
    Dim aDoc As Document
    Set aDoc = NormalTemplate.OpenAsDocument
    On Error Resume Next
    With aDoc
    .SaveAs FileName:="D:NormalTemplateNormalBackupNormalBacku p.dot"
    '.Close SaveChanges:=wdDoNotSaveChanges
    End With
    End Sub

    I commented out the .Close line, I don't think you need it. The AutoExit macro will be run when you quit Word.

Posting Permissions

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