Connector Macro Help

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hello Everyone,
I am very stuck and I was wondering if any of you could give me a
hand. I'm trying to write a Perl or VB script to connect some
rectangles in Visio with a 'connector'. I have found there is very
little help online in the way of making Visio macros with Perl. I have
found Perl can translate directly in to Visual Basic in most cases by
substituting "->" in for ".". For some reason, however, I am not able
to say

$Visio->ActivePage->Drop($Visio->ConnectorToolDataObject, 2, 2);
where $Visio is the Visio Application. I am using the Win32::OLE
library by the way.

Fortunatly, I am able to connect the shapes with the connector by
having it select the two rectangles and using

$Visio->ActiveWindow->Select($square1, 2);
$Visio->ActiveWindow->Select($square2, 2);
$Visio->ActiveWindow->Selection->ConnectShapes; main goal is to change the color of the connector. Is
there anyway to do this by way of the method I am using. I think I
need to set the connector it created equal to a variable somehow, that
way I can use the $connector->cells("LineColor")-> = color. I
am not currently sure how to define it. I was hoping one of you would
know some clever way to do it. If you know how to do this in VB,
without using the Drop way I would REALLY appriciate it, and hopefully
I will be able to translate it to Perl. I've been going around in
circles about this for days. If you know how to use the Drop way I
talked about above in Perl, first, you are awesome, second can you
please tell me how?

If you know the answer to this, seriously you are a genious.

Site Timeline