Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Corel Script through OLE automation

Status
Not open for further replies.

brenot

Programmer
Mar 10, 1999
1
FR
Hi,<br>
<br>
We are using Corel 7.0 french version under Windows NT 4.0 .<br>
We wish to pilot Corel remotely from Internet Explorer 4.01 with a VB Script<br>
to export Jpeg file from Cdr files.<br>
We want to apply a specific size to the exported bitmap without any<br>
deformation. So we have to get the size of drawing in our VB Script to<br>
compute the exportation size.<br>
We have found the ".GetSize" Corel Script instruction which seems to return<br>
XSize and YSize in arguments passed by reference.<br>
Since VB Script does not allow to pass arguments by reference, how can the<br>
XSize and YSize be returned from Corel in our VB Script ?<br>
Here is our code:<br>
<br>
Function NewimportCorel(fichier,larg,haut)<br>
Dim draw<br>
Dim XSize<br>
Dim YSize<br>
Set draw = CreateObject("CorelDraw.Automation.7")<br>
draw.SelectAllObjects<br>
draw.Group<br>
draw.GetSize.XSize, YSize &lt;--- does not work<br>
rem We have to compute here new apropriate valuse for larg and haut<br>
draw.FileExport fichier, 774, larg, haut, 72, 72, 3<br>
draw.FileClose<br>
Set draw = Nothing<br>
End Function<br>
<br>
<br>
Thanks,<br>
<br>
Jean-Marc BRENOT - AIS<br>
<br>
<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top