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

Tip: Looking for answers? Try searching our database.

File directory in a listbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dale - 01 Nov 2005 00:37 GMT
I am trying to reproduce a custom open file box out of WP6. I have a
form with two list boxes. The listbox on the left, lstGroup, is meant
to display a file directory tree beginning with a certain path. The
listbox on the right, lstTemplate, is meant to display the files from
the folder that is highlighted in the listbox on the left. When a user
selects the desired file, it then will be opened by Word for use. Is
this possible with Word VBA, and if so can anyone help me with the
code?

I have searched google groups, and other websites and found code
snippets, but I have not been able to get any of them to work. Either
that or they are meant for VB only.

I am a new student to VBA/VB and have learned a lot in a relatively
short amount of time, but as you can see there is a lot I still need to
learn.

Thanks in advance!
Jezebel - 01 Nov 2005 08:39 GMT
Yes, it's possible in VBA. There are several approaches depending on how
much work you want to do: build it yourself from scratch using listboxes and
treeview controls, populated manually from the file system; or you can use
the file and directory list controls (you'll need to add these to the
control toolbox using 'Additional controls')

But of all the wheels to reinvent, why pick this one? Window's users are
accustomed to the Explorer Window which you get anyway, with no additional
work.

>I am trying to reproduce a custom open file box out of WP6. I have a
> form with two list boxes. The listbox on the left, lstGroup, is meant
[quoted text clipped - 14 lines]
>
> Thanks in advance!
Jonathan West - 01 Nov 2005 11:06 GMT
Hi Dale,

Samples or controls for VB6 will usually work with VBA. If you want to use a
ready-made control, go to http://ccrp.mvps.org and download the
FolderTreeView control

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

>I am trying to reproduce a custom open file box out of WP6. I have a
> form with two list boxes. The listbox on the left, lstGroup, is meant
[quoted text clipped - 14 lines]
>
> Thanks 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.