Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / August 2006

Tip: Looking for answers? Try searching our database.

finding oHl.Address for an action button?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Geoff Cox - 18 Aug 2006 16:01 GMT
Hello,

The code below looks at each slide and finds any action buttons (type
1/130) but I would like to display the contents of the Address and
SubAddress fields.

I know that I need oHl.Address and oHl.SubAddress but not clear how to
get this info for each action button found.

How would I do this?!

Thanks

Geoff

Sub check_for_hyperlinks(strMyFile As String)
   
Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)

With oPresentation

Dim oSl As Slide

    For Each oSl In ActivePresentation.Slides
    Dim oSh As shape

        For Each oSh In oSl.Shapes
            If oSh.Type = 1 Then
            If oSh.AutoShapeType = 130 Then
              MsgBox "we have an action button"
            End If
        End If
           Next oSh
    Next oSl
 
oPresentation.Close
End With

Set oSh = Nothing
Set oPresentation = Nothing

End Sub
Bill Dilworth - 18 Aug 2006 18:51 GMT
The default action for the Next Slide action button is to advance to the
next slide (whatever the number of the next slide is).  It does not care
where you are in the presentation, it just advances to the next slide.  So,
the answer is Current location +1.

This will show you the address and sub-address of the NextSlide action
buttons on the second slide.

Sub OffTheCuff()
Dim oshp As Shape
For Each oshp In ActivePresentation.Slides(2).Shapes
   If oshp.Type = 1 Then
       If oshp.AutoShapeType = 130 Then
           With oshp.ActionSettings(ppMouseClick).Hyperlink
               MsgBox .Address & vbCr & .SubAddress
               End With
           End If
       End If
   Next oshp
End Sub

Signature

Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@     Please read the PowerPoint FAQ pages.
yahoo.             They answer most of our questions.
com                 www.pptfaq.com
.

> Hello,
>
[quoted text clipped - 39 lines]
>
> End Sub
Geoff Cox - 19 Aug 2006 00:09 GMT
>The default action for the Next Slide action button is to advance to the
>next slide (whatever the number of the next slide is).  It does not care
[quoted text clipped - 16 lines]
>    Next oshp
>End Sub

Many thanks Bill.

Cheers

Geoff
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.