in reply to Re: Help with Shapes in Visio - via OLE
in thread Help with Shapes in Visio - via OLE

Thanks Aquarium, A little more digging shows how to do it....

.......
my $shapeObj = $visioPage->Drop($stencilObj, $dropX, $drop);
$shapeObj->{'Text'} = $shapeName;

my $shpWidthObj = $shapeObj->Cells('Width');
my $shpHeightObj = $shapeObj->Cells('Height');

$shpWidthObj->{'Formula'} = $WIDTH;
$shpHeightObj->{'Formula'} = $HEIGHT;
........

I just typed this in from memory - have to run to the store. I'll post a fuller example (with descriptions) for future generations... <lol>
  • Comment on Re^2: Help with Shapes in Visio - via OLE

Replies are listed 'Best First'.
Re^3: Help with Shapes in Visio - via OLE
by Anonymous Monk on Dec 28, 2007 at 17:01 UTC
    Can you post your final program, jdsell? I am interested in how you were able to perform the Drop mostly, as I have been having trouble finding the correct syntax for it. What do $stencilObj, $dropX, and $drop equal? This is what I have. I am trying to drop a connector.
    $stencilobj = $Visio->ConnectorToolDataObject; $vsoConnectorShape = $Visio->ActiveWindow->Page->Drop($stencilobj, 2, +2);
    Thanks! Joe