Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    London, Gtr London, England
    Posts
    100
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Naming new file right from the get-go (2000 SP4)

    Any ideas on a macro to open a new file and force me to give it a name, right when I open it. I lost a load of work this week with a too hasty "File/Close/No" combo to a doc I had not named and which was not backed up every three minutes, as i thought it would. I am using a macro from Macros9.exe which I got from MS and which, as Macros9.dot, has set a save sequence each time I open Word.

    Regards
    Will

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

    Re: Naming new file right from the get-go (2000 SP4)

    If you want this to happen for all blank new documents, you can do it as follows:
    - Activate the Visual Basic Editor (ALt+F11)
    - Expand Normal, then Microsoft Word Objects.
    - Double click ThisDocument.
    - Select Document from the dropdown list in the upper left of the module window that appears.
    - Make the code look like this:

    Private Sub Document_New()
    On Error Resume Next
    ActiveDocument.Save
    End Sub

    If you'd rather use a standard macro:
    - Click on Normal in the Visual Basic Editor.
    - Select Insert | Module.
    - Copy the following code into the module:

    Sub NewAndSave()
    On Error Resume Next
    Documents.Add.Save
    End Sub

    - You can assign this macro to a custom toolbar button and/or keyboard shortcut.

    If you want to be prompted to save whenever you create a document from any template, it gets more complicated.

  3. #3
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    London, Gtr London, England
    Posts
    100
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Naming new file right from the get-go (2000 SP4)

    Hans, this is not the first time you have helped me with a quick and effective reply! I'm most grateful.

    Kind Regards
    Will

Posting Permissions

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