Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

ChDrive ChDir

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnTheTemp - 26 Feb 2006 22:53 GMT
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.

Signature

JohnTheTemp

Greg Maxey - 26 Feb 2006 23:04 GMT
Try:
Sub ScratchMacro()
Options.DefaultFilePath(Path:=wdDocumentsPath) = _
       "J:\Jobs\"
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> I'm using Word 2003 and I can't get these simple commands to work the
> way I expect:
[quoted text clipped - 12 lines]
>
> Thanx in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.