I did it now, but I can't see anything about Visio!
$object->Hyperlinks->Add(...) does not work in Visio! It seems like Hyperlinks->Add or AddHyperlink doesn't exists in Visio contest!
/Hossein | [reply] |
In Visio (I have 2007) you go to the VB editor (Alt-F11), and then to the Object Browser (F2). Under classes you can see that the Shape objects have a Hyperlinks property. Again under classes you can see that the Hyperlinks objects have an Add method. I can't write some code to demonstrate this now, but this procedure should get you there with a little experimentation...
UPDATE: Done some experiments myself. If $shape refers to some shape in the current document, then the following code creates a hyperlink, that turns up in the context menu of the shape.
my $link = $shape->AddHyperlink();
$link->{Description} = "Google";
$link->{Address} = "http://www.google.de";
| [reply] [d/l] [select] |
| [reply] |