#IF
If you plan on using the XML Document Object Model (DOM) for HTTP transport or creating XML documents, it must be installed. The following code checks to see if it is installed on the user's pc first. If not, it provides a nice message instead of an error.
To test it, you can copy all this code into a prg and run it.
#ENDIF
loDomExist = CREATEOBJECT("MSXML2.DOMDocument")
IF NOT TYPE("loDomExist") = "O"
lcMsg = "This application requires Microsoft's XML Document Object Module." +;
" It is not installed on this PC. The easiest way to install it is " +;
"to install Interent Explorer (IE) 6.0, Service Pack 1 or greater..." +;
CHR(13)+ CHR(10)+ CHR(13)+ CHR(10) + "You can download and install the latest " +;
"version of Internet Explorer at www.microsoft.com/downloads";
MESSAGEBOX(lcMsg)
RETURN
ELSE
MESSAGEBOX("XMLDOM is installed.")
ENDIF
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.