I'd like to open various types of files...

  • Thread starter Thread starter Eddie
  • Start date Start date
E

Eddie

There are many different kinds of files in shared directory.
In Access form, I can save them with saveas dialog.
At now, I want to open them automatically, i.e. when I select
..zip file with command button, the zip file should be opened with
winzip, when I select .xls file, MS Excel shoud open the file.

Is there any good idea for this?

Thanks in advance.
 
Eddie said:
There are many different kinds of files in shared directory.
In Access form, I can save them with saveas dialog.
At now, I want to open them automatically, i.e. when I select
.zip file with command button, the zip file should be opened with
winzip, when I select .xls file, MS Excel shoud open the file.

Is there any good idea for this?

Thanks in advance.

I think this link may be what you're looking for:

http://www.mvps.org/access/api/api0018.htm
API: Start an app with ShellExecute
 
To open a file, and launch the appropriate application, you can use:

application.FollowHyperlink "c:\path to your document"

So, to open a word document, you can go:

application.FollowHyperlink "c:\mydocs\test.doc"

To open excel, you can go:

application.FollowHyperlink "c:\mydocs\test.xls"
 

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

Back
Top