• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

Word 2002 SP3 SaveAs FileDialog macro code problem

I got this from the VBA Help of Word 2002:
This example displays the Save As dialog box.

Sub ShowSaveAsDialog()
    Dim dlgSaveAs As FileDialog
    Set dlgSaveAs = Application.FileDialog( _
End Sub
 This creates two problems for me:
1) It displays the SAVE and NOT the SAVEAS dialog, anyone know why?
2) When I type in the filename to save the file as, the file is NOT saved as such, anyone know why?

Hope you can shed some light on this for me VBA is not my forte

1 Solution
I cannot compile your code in my Word 2000 application - FileDialog type is not known. For this reason, it may be better to have this question moved to the Word Area.
Meanwhile, you might like to try this alternative code which works OK for me in Word 2000 VBA.

Sub ShowSaveAsDialog()
    Dim dlgSaveAs As Dialog
    Set dlgSaveAs = Dialogs(wdDialogFileSaveAs)
End Sub
CMYACHTIEAuthor Commented:
Thanks GrahamSkan that works for me, funny how many different reactions one gets between 2000 and XP in VBA code.
It's been very frustrating

Thanks for you help

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now