How to get/select one or more filenames

E

Ebbe

Hey!

I have a Word-macro, that reads some data from one ore more .txt files.
The name of the files is given at each run.
I am looking for a dialog box, in the style of Dialogs(wdDialogFileOpen),
that returns me name and path of one or more selected files.
If it is possible to give a initial directory to search in and one or more
searchpatterns like "Textfiles (*.txt), *.txt" I would be delighted!

Running MS-Office 2000 and 2003

Ebbe
 
C

Cindy M -WordMVP-

Hi Ebbe,
I have a Word-macro, that reads some data from one ore more .txt files.
The name of the files is given at each run.
I am looking for a dialog box, in the style of Dialogs(wdDialogFileOpen),
that returns me name and path of one or more selected files.
If it is possible to give a initial directory to search in and one or more
searchpatterns like "Textfiles (*.txt), *.txt" I would be delighted!

Running MS-Office 2000 and 2003
2002 and 2003, yes, there's a handy-dandy FileDialog object. Prior to those
versions, however, there's no really good solution for selecting multiple
files that doesn't involve messing with the Windows API, or creating your
own lists in a UserForm. Or, perhaps using a TreeControl (something I've
never tried).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
E

Ebbe

Exactly what I looked for :)

Do You (or other in this group) have the API code for earlier versions of
MS-Office?

Ebbe
 

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