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!

Executing MS Word Document from ASP

Status
Not open for further replies.

tagid

Programmer
Sep 26, 2002
8
US
Is there a command to initiate a MS Word session when a user clicks on a .doc file on a webpage?

I remember seeing the syntax for this, but I can't find it. If it can't be done from ASP could it be done from javascript?

Thanks, Joe
 
This should happen automatically (certainly with IE5+). Any office document (excel, powerpoint etc..) should open with the relevant application. --James
 
Here are the items you need, I included excel just in case anyone wants that too.

-- For Excel --
response.ContentType = "application/vnd.ms-excel"

-- For Word --
response.ContentType = "application/vnd.ms-word"

This forces the browser into the application even if its not a word document.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top