Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Open/SaveAs Dialogs in Word

Status
Not open for further replies.

RoyVidar

Instructor
Jun 16, 2000
6,606
NO
Hi!

I need the same functionality as the .GetSaveAsFilename method gives you in Excel, but in Word (2000). (I'm hoping to achieve this without calling the methods thru Excel).

I'm trying the Dialogs(wdDialogFileOpen).Show thingie in Word, but it does not seem possible to set file filters and initialfilename (path) for it (which I need).

Any suggestions? Classes/methods within Word?

Roy-Vidar;-)
 
Hi Roy-Vidar,

I gather from the Word VBA help files that you have to create a variable to point to the dialog first, then set the property you want as an argument to your variable - see following:
Code:
Sub dialogFO()

Set myDialog = Dialogs(wdDialogFileOpen)
myDialog.Name = "*.txt"
myDialog.Show

End Sub
I don't like the new help format, but you can find more stuff on this as follows (if you've got the VBA help files installed):
Help >> Index >> Keywords = Displaying built-in dialog >> then try two of the options listed: "Displaying built-in Word dialog boxes" and "Built-in dialog box argument lists"

Good luck, SteveB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top