none
VBA - Word - Save AS Prompt To User

    Question

  • I am looking to find a way to prompt the user to SAVE AS when opening the word doc.

    Or can someone let me know if the template option is a better one to utilize so I don't overwrite the original document?



    Thank you!
    Friday, May 09, 2008 7:52 PM

All replies

  • You can try writing the code in AutoOpen (You can create a module by name AutoOpen) and add the following code to that

    Sub Main()

    With Application.Dialogs(wdDialogFileSaveAs)
        .Name = "c:\My Documents\SaveExample.doc"
        .Format = wdFormatDocument
        .Show
    End With

    End Sub



    Alternately, if you are having a form that needs to be filled, then create a Word Template (*.dot) file and use the following to open a word document based on template

    Sub Open_With_Template()

    Dim oWD As Document

    Set oWD = Documents.Add("c:\MyNewTemplate.dot")

    End Sub

    Cheers
    Shasur
    Saturday, May 10, 2008 2:02 AM
  • Great, I like the alternate idea b/c there is a form.

    My only issue with creating a template (.dot) file is that there is VBA code within the template that needs to be used in the
    copy made..but when I create a .dot file the new saved file does not inherit or copy over.  So the form is then not 100% functional. 
    How can this be fixed?  Any ideas?

    Is there a way to copy the VBA code from template to saved copy or can I reference the original template VBA code ( if the template is never moved from the path)......

    Thank you.
    L
    Monday, May 12, 2008 11:02 AM
  •  LBL2009 wrote:
    Great, I like the alternate idea b/c there is a form.

    My only issue with creating a template (.dot) file is that there is VBA code within the template that needs to be used in the
    copy made..but when I create a .dot file the new saved file does not inherit or copy over.  So the form is then not 100% functional. 
    How can this be fixed?  Any ideas?

    Is there a way to copy the VBA code from template to saved copy or can I reference the original template VBA code ( if the template is never moved from the path)......

    Thank you.
    L

     

    Please help if possible. That is exactly what I need also. I have a .dot file that creates a standard offer letter for prospective employees. I would like the Word document to prompt the user to save the file as a .doc file using several variable (txt.RecipientLastName & txtRecipientFirstName) as the name of the file.

     

     

    Thank You

    Wednesday, June 18, 2008 11:26 AM
  • I realize this is an old thread, but I just ran into this same problem.  I know how to use the .GetFileSaveAs for Excel, but couldn't figure out the Word VBA.  This worked perfectly.  Just wanted to say THANK YOU!

     

    Padawan John

    Thursday, June 24, 2010 8:59 PM