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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign a Path when saving (URGENT!!)

Status
Not open for further replies.

kabnl

Programmer
Jul 25, 2002
9
0
0
NL
Please HELP
I am working in Word (xp) and have a form on a template that enables the user to, when saving, either overwrite or keep both. Overwrite is not problem, but when keeping both word places the document in the default directory (tools, options, file locations...)HOW DO I GET WORD TO LET THE USER SELECT WHICH DIRECTORY ???
The code I am useing is:-

docActiveDocument.SaveAs FileName:=strPathName & strFileName, FileFormat:=wdFormatDocument

Any suggestions ANYONE ???
 
Hi kabnl,

I don't know if this will help, but the syntax for displaying the "File Save As" dialog is as follows:
Code:
Dialogs(wdDialogFileSaveAs).Display
Good luck.
 
Steve, you gave an excellent answer. (kabnl is in a state of urgency now, and probably doesn't have time to say so LOL!).

In case anyone wants to do this in Excel, prior to application.saveas I go

dim foo as variant
foo = Application.GetSaveAsFilename(, , , Title:="Set destination dir")
 
Steve and John
Many thanks for your advise - I had already changed the code to use Dialogs, as it seems to be the only way to give the freedom of changing the path.

Once again thanks....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top