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

Default directory

Status
Not open for further replies.

mangocinn

Programmer
Jul 26, 2001
66
US
Question:

I'm using VB6 to create a document...specifically a powerpoint presentation. I want the document to be saved to a certain directory or atleast be defaulted to that directory. How do I specify the defalult directory where I want the document to be saved? I want to do this without using the common dialog control...

Thanks in advance.
 
You can use the ChDrive and ChDir functions. With these you can set the default drive and directories. Hope it helps.
 
cimeson,
I tried using those statements to change my directory. I used the CurDir function to see if the chDir statement worked...it did in that CurDir returns the new directory....
but... when I hit 'Save As' on my document...the default directory was not affected at all.

BTW, I want to save my document on another machine (a server that is part of the network)
 

In your saveas parameters I belive you have to provide a file name. For that arguement you can specify a fully qualified path/file name either in drive or UNC format.

Good Luck

 
Thanks for the responses.

ok, let me a bit more clear.

I don't want to save the document through my code... I just want my code to provide a suitable default directory.

The save action will occur when the user hits the save icon on the powerPoint toolbar...and the save as dialog is displayed....

 
help??

Is there a API or something that refers to common dialog boxes?
 

I believe that all office products have an options dialog that allows you to specify where the default directory is. I do not know if you can get to it via the object model but you should be able to find it in the registry and if need be change it there.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top