Download or Update OWC with AsP

M

Mayron Guevara

Hello, my first problem is:

I have four users that not have Microsoft Office installed, their consult my
website, but some reports is in PivotTable...

I download OWC11.EXE, How to insert in the code to the ASP Page, for know if
not have OWC his install the OWC11.EXE ... and if have it, not be nothing.

I find this:
<object classid=0000000 codebase="">

But this always install the OWC11.EXE every time to load the page.


Sorry for my English but I only speak Spanish....

Thanks for All.
 
A

Alvin Bruney [MVP - ASP.NET]

I assume that you are talking about the owc11 assembly - there is no exe.
I've written some sniffer code that can detect the owc, you will find it
below. This code comes from the black book


Code-listing 1.9 detecting the O.W.C. in code




vbscript# Snippet




<script language="vbscript">

Sub CheckForOWC()

Dim objOWC

Dim retval

on error resume next

Dim downloadPath

downloadPath =
"http://download.microsoft.com/download/OfficeXPStandard/owc10/10
33/WIN98MeXP/EN-US/owc10.exe"




Set objOWC = CreateObject("OWC10.Chartspace")

if(objOWC is nothing) then

if msgbox ("O.W.C. v10 is a required component. Click YES to install it [8
megs appr. 5 - 10min]. If you don't have Office XP installed, you will not
be allowed to change values in the spreadsheet",3,"Critical component
missing!") = 6 then


window.navigate(downloadPath)

end if

else

if(objOWC.MajorVersion < 10) then

if msgbox ("O.W.C. v10 is a required component. Click YES to install it [8
megs appr. 5 - 10min]. If you don't have Office XP installed, you will not
be allowed to change values in the spreadsheet", 3, "Critical component
missing!") = 6 then


window.navigate(downloadPath)

end if

end if

end if

End Sub

</script>



--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
 

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

Top