Share via


Hyperlink Object


Aa201171.parchild(en-us,office.10).gifHyperlink

Represents a hyperlink associated with a non-placeholder shape or text. You can use a hyperlink to jump to an Internet or intranet site, to another file, or to a slide within the active presentation. The Hyperlink object is a member of the Hyperlinks collection. The Hyperlinks collection contains all the hyperlinks on a slide or a master.

Use the Hyperlink property to return a hyperlink for a shape. A shape can have two different hyperlinks assigned to it: one that's followed when the user clicks the shape during a slide show, and another that's followed when the user passes the mouse pointer over the shape during a slide show. For the hyperlink to be active during a slide show, the Action property must be set to ppActionHyperlink. The following example sets the mouse-click action for shape three on slide one in the active presentation to an Internet link.

  With ActivePresentation.Slides(1).Shapes(3) _
        .ActionSettings(ppMouseClick)
    .Action = ppActionHyperlink
    .Hyperlink.Address = "http://www.microsoft.com"
End With

A slide can contain more than one hyperlink. Each non-placeholder shape can have a hyperlink; the text within a shape can have its own hyperlink; and each individual character can have its own hyperlink. Use Hyperlinks(index), where index is the hyperlink number, to return a single Hyperlink object. The following example adds the shape three mouse-click hyperlink to the Favorites folder.

  ActivePresentation.Slides(1).Shapes(3) _
    .ActionSettings(ppMouseClick).Hyperlink.AddToFavorites

Note   When you use this method to add a hyperlink to the Microsoft Internet Explorer Favorites folder, an icon is added to the Favorites menu without a corresponding name. You must add the name from within Internet Explorer.