F
FParsons
Hi! Please Help! I've run into a dead-end trying to use the MODI
ActiveX control with VBScript. I need to access the Document object. I
have an HTML page with the <object> tag. I DO have the object model
help file, downloaded from Microsoft.
I can access the MiDocViewer objects just fine by referring to the ID
of the control, for example:
viewCtl.PageNum=0, to go to the first page
To access the other needed functions, I need to get to the document
object. There is a "Document Property" (you can load the image using
this), and the "Document Object". In VBScript, you need to use
"CreateObject("MODI.Document") , don't you?
This does not work (file not loaded into control "viewCtl")
dim doc
set doc=CreateObject("MODI.Document")
doc.Create(IMAGE_PATH)
set viewCtl.Document=doc
msgbox(doc.Images.count)
Nor does this (file already loaded into control "viewCtl")
dim doc
set doc=CreateObject("MODI.Document")
doc=viewCtl.Document
msgbox(doc.Images.count)
I didn't include the HTML, but here's the object tag I used:
<OBJECT id="viewCtl" height="600" classid="CLSID:EF347A62-
BA21-42E4-94A0-1C0A6D7FDFE7" >
<PARAM name="_cx" value="10605">
<PARAM name="_cy" value="11769">
<PARAM name="ActionState" value="0">
<PARAM name="DocViewMode" value="0">
<PARAM name="FitMode" value="0">
<PARAM name="FileName" value="">
</OBJECT>
Can anyone tell me if I'm doing something wrong, or does the MODI
activeX control just not work with VBScript? Thanks for any replies!
--- Francis
ActiveX control with VBScript. I need to access the Document object. I
have an HTML page with the <object> tag. I DO have the object model
help file, downloaded from Microsoft.
I can access the MiDocViewer objects just fine by referring to the ID
of the control, for example:
viewCtl.PageNum=0, to go to the first page
To access the other needed functions, I need to get to the document
object. There is a "Document Property" (you can load the image using
this), and the "Document Object". In VBScript, you need to use
"CreateObject("MODI.Document") , don't you?
This does not work (file not loaded into control "viewCtl")
dim doc
set doc=CreateObject("MODI.Document")
doc.Create(IMAGE_PATH)
set viewCtl.Document=doc
msgbox(doc.Images.count)
Nor does this (file already loaded into control "viewCtl")
dim doc
set doc=CreateObject("MODI.Document")
doc=viewCtl.Document
msgbox(doc.Images.count)
I didn't include the HTML, but here's the object tag I used:
<OBJECT id="viewCtl" height="600" classid="CLSID:EF347A62-
BA21-42E4-94A0-1C0A6D7FDFE7" >
<PARAM name="_cx" value="10605">
<PARAM name="_cy" value="11769">
<PARAM name="ActionState" value="0">
<PARAM name="DocViewMode" value="0">
<PARAM name="FitMode" value="0">
<PARAM name="FileName" value="">
</OBJECT>
Can anyone tell me if I'm doing something wrong, or does the MODI
activeX control just not work with VBScript? Thanks for any replies!
--- Francis