Problems with DoCmd commands

D

Daniel

Hey altogether.

I have implemented the Visio Drawing Control in a Webpage (aspx) and I want
to script against the visio object. I can save a file (See the example
below). But how can I use the DoCmd-Commands e.g. to realize a print command
or to open the shape window.

<%@ Import Namespace="Microsoft.Office.Interop.Visio" %>
<%@ Import Namespace="Microsoft.Office.Interop.VisOcx" %>
....
<script language="vbscript" type="text/vbscript">
<!--
Sub cmdChangeIt_onClick
axVisio.Window.Application.ActiveDocument.SaveAs("c:\Test123.vsd")
End Sub
-->
</script>
....
<form name="ChangeControls">
<input type="button" name="cmdChangeIt" value="Save">
<input type="button" name="visCmdPrintPreview" value="Druckvorschau">
</form>
....
<OBJECT ID="axVisio" classid="clsid:E4615FA3-23B0-4976-BD3E-D611DDBE330E" >
<param name="NegotiateMenus" value="0">
<param name="NegotiateToolbars" value="0">
<param name="PageSizingBehavior" value="0">
<param name="HostID" value="testHostID">
<param name="Src" value="">
</OBJECT>
....

Best,
Daniel
 
E

elias

Daniel,
I seem to be getting an "Object required" error when trying to do a save as.
I dont know what im doing wrong. The drawing control is running fine, but, I
can seem to get your code:
axVisio.Window.Application.ActiveDocument.SaveAs("c:\Test123.vsd")

to work.
My autocomplete does not recognize the order, however, it does let me put
the following code:

axVisio.Document.SaveAs("C:\test123.vsd")

but still, gives me an object required error when i press the "save" button.


Anyone help please, i dont know what im doing wrong.

url:http://www.ureader.com/msg/11301882.aspx
 

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