Hello everyone,
I am writing a web app that will interact with MS Word. I was wanting to detect if MS Word is installed on a client system before they access the web app in order to let them know that if it is not istalled they need to install it. Here is what I have come up so far with the code:
script language="JavaScript">
<!--
// detection for Firefox, Mozilla, Netscape, and Opera.
var useMSW = navigator.mimeTypes && navigator.mimeTypes["application/msword"];
//-->
</script>
<script language="VBScript">
// detection for Internet Explorer.
on error resume next
useMSW = not IsNull(CreateObject("Word.Document.8"))
</script>
<script>
<!--
if (useMSW){
document.write("Microsoft Word is installed.");
}else{
document.write("Microsoft Word not found.");
}
//-->
</script>
The detection works fine for Firefox, Mozilla, Netscape, and Opera. The main challenge/problem is with Internet Explorer. When the detection runs it prompts the "user" that an ActiveX Control on the page might be unsafe to interact with other parts of the page. Knowing how certain users are he/she might freak out and hit the cancel/no button and no detection will run. I was wondering if any of you have any suggestions on how to avoid running the ActiveX control.
Thanks!
Grx21
I am writing a web app that will interact with MS Word. I was wanting to detect if MS Word is installed on a client system before they access the web app in order to let them know that if it is not istalled they need to install it. Here is what I have come up so far with the code:
script language="JavaScript">
<!--
// detection for Firefox, Mozilla, Netscape, and Opera.
var useMSW = navigator.mimeTypes && navigator.mimeTypes["application/msword"];
//-->
</script>
<script language="VBScript">
// detection for Internet Explorer.
on error resume next
useMSW = not IsNull(CreateObject("Word.Document.8"))
</script>
<script>
<!--
if (useMSW){
document.write("Microsoft Word is installed.");
}else{
document.write("Microsoft Word not found.");
}
//-->
</script>
The detection works fine for Firefox, Mozilla, Netscape, and Opera. The main challenge/problem is with Internet Explorer. When the detection runs it prompts the "user" that an ActiveX Control on the page might be unsafe to interact with other parts of the page. Knowing how certain users are he/she might freak out and hit the cancel/no button and no detection will run. I was wondering if any of you have any suggestions on how to avoid running the ActiveX control.
Thanks!
Grx21