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 / January 2005

Tip: Looking for answers? Try searching our database.

VBA to show a folder navigation window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon - 06 Jan 2005 15:09 GMT
I'd like to write a VBA programme to change the default directory that Word
uses for clip art pictures. In Word 2003, this can be selected in Tools >
Options, File Locations tab, Clipart Pictures, but I'd like to make it
easier by having a toolbar button that brings up a dialogue box in which the
user can navigate to the desired folder then set the Clipart Pictures folder
to this location. How do I bring up such a dialogue box in VBA?
Dave Lett - 06 Jan 2005 16:12 GMT
Hi Jon,

This is the best that I can come up with:

SendKeys "%f{DOWN}%m"
Dialogs(wdDialogToolsOptionsFileLocations).Show

HTH,
Dave

> I'd like to write a VBA programme to change the default directory that Word
> uses for clip art pictures. In Word 2003, this can be selected in Tools >
> Options, File Locations tab, Clipart Pictures, but I'd like to make it
> easier by having a toolbar button that brings up a dialogue box in which the
> user can navigate to the desired folder then set the Clipart Pictures folder
> to this location. How do I bring up such a dialogue box in VBA?
Jon - 07 Jan 2005 12:33 GMT
Hi,

Thanks for your answer.

Does this mean that there isn't a way in VB to bring up a dialogue box for
folder navigation?

Jon.

> Hi Jon,
>
[quoted text clipped - 15 lines]
> folder
>> to this location. How do I bring up such a dialogue box in VBA?
Jay Freedman - 07 Jan 2005 14:22 GMT
Hi Jon,

It doesn't mean that at all. There are several ways -- see
http://word.mvps.org/FAQs/MacrosVBA/BrowsDialog.htm.

The advantage of Dave's solution is that when the user selects a folder in
the ToolsOptionsFileLocations dialog and clicks OK, it automatically changes
the Clipart location; your code doesn't have to do anything else. If you
used one of the generic folder browser methods, then your code would have to
separately set the Clipart location to the selected folder.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

> Hi,
>
[quoted text clipped - 22 lines]
>>> desired folder then set the Clipart Pictures folder to this
>>> location. How do I bring up such a dialogue box in VBA?
 
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.