ChDrive ChDir

J

JohnTheTemp

I'm using Word 2003 and I can't get these simple commands to work the way I
expect:

Sub temp()
ChDrive "J"
ChDir "J:\JOBS\"
End Sub

I thought that after running this, I could do a "File Open" and the dialog
box would be looking at the J:\JOBS folder. Instead, it's looking at the root
of C: or the last folder I selected manually.

I'd appreciate an explanation, and the real method to change the current
directory using VBA.

Thanx in advance.
 
G

Greg Maxey

Try:
Sub ScratchMacro()
Options.DefaultFilePath(Path:=wdDocumentsPath) = _
"J:\Jobs\"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top