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 <--- 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>
<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 <--- 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>