Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    IL
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    File Save As - Word 2007 (Word 2007)

    I am trying to write an macro in Word 2007 that will prompt me to enter the file name on the save as command. Is there a way to do this?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: File Save As - Word 2007 (Word 2007)

    When you use Save As, Word already presents a dialog that requires you to name the new file... can you describe what you want to change in more detail?

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

    Re: File Save As - Word 2007 (Word 2007)

    The line
    <code>
    Application.Dialogs(wdDialogFileSaveAs).Show
    </code>
    will show the Save As dialog and save the document if the user clicks OK. If you want to decide what to do with the result, you can use
    <code>
    With Application.Dialogs(wdDialogFileSaveAs)
    If .Display = True Then
    MsgBox .Name
    Else
    MsgBox "Dialog canceled by user"
    End If
    End With</code>

Posting Permissions

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