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!

How can I launch an Excel application from IE via VBScript?

Status
Not open for further replies.

Ayac

Programmer
Nov 10, 2000
141
HU
Hi all!

The code below works with Word files and Internet Explorer (I have IE 5.5 and Office 2000) setting the security level to Low. If I want to use the same script to download an Excel application (and replace "Word.Application" with "Excel.Application", the browser launch Excel but then it stops and refuse to load the xls file:


<script language=&quot;VBScript&quot;>
<!--
Sub MenuClick()
Dim ojbWord
Set objWord = CreateObject(&quot;Word.Application&quot;)
objWord.Visible = true
objWord.Documents.Open &quot;/mywebsite/test.doc&quot;
Set objWord = Nothing
window.location.href=&quot;/home.asp&quot;
End Sub
//-->
</script>
...
<body onLoad=&quot;VBScript:MenuClick()&quot;>


Does anyone have any ideas how can I fix this?
I would really appreciate your help,

Thanks!

Ayac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top