Table of contents
TOC
Collapse the table of content
Expand the table of content

Hyperlinks Object (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

A collection of all the Hyperlink objects on a slide or master.

Example

Use the Hyperlinksproperty to return the Hyperlinks collection. The following example updates all hyperlinks on slide one in the active presentation that have the specified address.

For Each hl In ActivePresentation.Slides(1).Hyperlinks

    If hl.Address = "c:\current work\sales.ppt" Then

        hl.Address = "c:\new\newsales.ppt"

    End If

Next

Use the Hyperlinkproperty to create a hyperlink and add it to the Hyperlinks collection. The following example sets a hyperlink that will be followed when the user clicks shape three on slide one in the active presentation during a slide show and adds the new hyperlink to the collection. Note that if shape three already has a mouse-click hyperlink defined, the following example will delete this hyperlink from the collection when it adds the new one, so the number of items in the Hyperlinks collection won't change.

With ActivePresentation.Slides(1).Shapes(3) _
        .ActionSettings(ppMouseClick)

    .Action = ppActionHyperlink
    .Hyperlink.Address = "http://www.microsoft.com"

End With

See also

Concepts

PowerPoint Object Model Reference

© 2017 Microsoft