dbTalk Databases Forums  

List Box to read files

comp.database.ms-access comp.database.ms-access


Discuss List Box to read files in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paolo
 
Posts: n/a

Default List Box to read files - 10-17-2003 , 08:52 AM






Friends, I was thinking of creating a form in Access and add a list
box that displays all my Word files I have saved in my C:\My
Documents\ folder.
Once a users selects the required file, it should automatically open.

Is this something possible to do with Access?

Thanks.

Reply With Quote
  #2  
Old   
Scott McDaniel
 
Posts: n/a

Default Re: List Box to read files - 10-18-2003 , 05:32 AM






Access supplies you with the Dir() command, which you can use to build a
file/folder listing. Check online help for examples.

After selecting the file, you would automate Word to open your file:

<air code>
Dim wrd As Word.Application
Set wrd = New Word.Application

wrd.Documents.Open "PathToYourDocument"

etc etc
"Paolo" <jprma (AT) tin (DOT) it> wrote

Quote:
Friends, I was thinking of creating a form in Access and add a list
box that displays all my Word files I have saved in my C:\My
Documents\ folder.
Once a users selects the required file, it should automatically open.

Is this something possible to do with Access?

Thanks.



Reply With Quote
  #3  
Old   
Bradley
 
Posts: n/a

Default Re: List Box to read files - 10-20-2003 , 06:13 PM



Alternatively you could call a Windows file dialog with the arguments for
the folder and the file type..

I think an example is here: http://www.mvps.org/access/api/api0001.htm

--
Bradley
Software Developer www.hrsystems.com.au
A Christian Response www.pastornet.net.au/response


"Scott McDaniel" <scott (AT) no (DOT) spam.thedatabaseplace.net> wrote

Quote:
Access supplies you with the Dir() command, which you can use to build a
file/folder listing. Check online help for examples.

After selecting the file, you would automate Word to open your file:

air code
Dim wrd As Word.Application
Set wrd = New Word.Application

wrd.Documents.Open "PathToYourDocument"

etc etc
"Paolo" <jprma (AT) tin (DOT) it> wrote in message
news:9f41a860.0310170552.390887e4 (AT) posting (DOT) google.com...
Friends, I was thinking of creating a form in Access and add a list
box that displays all my Word files I have saved in my C:\My
Documents\ folder.
Once a users selects the required file, it should automatically open.

Is this something possible to do with Access?

Thanks.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.