in reply to Re: AddHyperlink in Visio
in thread AddHyperlink in Visio

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

Replies are listed 'Best First'.
Re^3: AddHyperlink in Visio
by hdb (Monsignor) on Aug 27, 2013 at 13:25 UTC

    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";
Re^3: AddHyperlink in Visio
by Corion (Patriarch) on Aug 27, 2013 at 11:48 UTC

    This is a problem with Visio and not with Perl. You will then have to read the Visio documentation and find out what the appropriate method is.