Using Query Output

  • Thread starter Thread starter Rick Preiss
  • Start date Start date
R

Rick Preiss

Suppose the result of an Access query is a list of paths to documents
such as "C:\my documents\filename.doc". I want to then
programmatically open each of the documents in the list. That is,
open "C:\my documents\filename.doc", "C:\my documents\filename1.doc",
"C:\my documents\filename.doc2", etc. How do I do that using Access?

Thanks,

Rick
 
If you know what application you want to use to open the files then yo
can use Runapp and include the filename as part of the command line o
the application.

If your applications you want to use are MSOffice then you can use th
application method for office objects

Dim xls As Excel.Application
Dim xlbook As Excel.Workbook

Set xls = CreateObject("Excel.Application")
Set xlbook = xls.Workbooks.Open(strTemplatePath)
xls.Visible = True

I believe this will work for any Office Ap
 
dandgard said:
If you know what application you want to use to open the files then you
can use Runapp and include the filename as part of the command line of
the application.

If your applications you want to use are MSOffice then you can use the
application method for office objects

Dim xls As Excel.Application
Dim xlbook As Excel.Workbook

Set xls = CreateObject("Excel.Application")
Set xlbook = xls.Workbooks.Open(strTemplatePath)
xls.Visible = True

I believe this will work for any Office App
 
Back
Top