Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to create SaveAs dialog (2000/sr1)

    How does one create via VBA code the SaveAs dialog.

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

    Re: How to create SaveAs dialog (2000/sr1)

    I assume that by "create" you mean show. The Save As dialog is Application.Dialogs(wdDialogFileSaveAs). This object has several properties and methods you can use.
    To display it without actually saving a document, use the Display method. To show it and save the document if the user clicks OK, use the Show method. For example:

    With Application.Dialogs(wdDialogFileSaveAs)
    ' Propose a name
    .Name = "Test.doc"
    ' Show the dialog
    If .Show = -1 Then
    MsgBox "Document saved as " & .Name
    End If
    End With

    The online help has more info, for example a list of arguments you can use for built-in dialogs.

Posting Permissions

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