Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

External File Referencing

Status
Not open for further replies.

Deltaflyer

Programmer
Oct 11, 2000
184
GB
I have a page that i want to link documents to. Like in HTML, where you click a button and download the file AND open it. Could somebody please tell me how i can open an external file in its native browser. Ie. .DOC in Word .XLS in Excel, .PPT in Powerpoint. DeltaFlyer
The Only Programmer To Crash With Style. LOL
 
Try API function

ShellExecute()

look for the params at the vb api-viewer
bluenote@uyuyuy.com
(excuse my english)
 
You may call it by a shell statement. And explorer will decide (it's own :) the best application to run the file.. But it generally works..

Like..
Code:
Call Shell("explorer " + Chr$(34) + "c:\my documents\try.xls" + chr$(34))

this will run excel and load try.xls into it.
P.S.: Chr$(34)'s are used for preventing misunderstand spaces in a file full path. If you discard Chr$(34) the fullpath will be truncated to the space.

Hope it works!
Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top