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 / April 2008

Tip: Looking for answers? Try searching our database.

Update link to slide

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gil - 24 Apr 2008 00:41 GMT
Hello,

I have a slide with some rectangles (used as hyperlinks).
I wrote a sub to update these links.
It worked great, but when I added some slides before this slide I got an
error (run time error. The item with the specified name was not found).
I checked and verify that the slide's name remain "Slide 2" (althought I
added some slides before this slide).

How Can I set s point to the same slide (in case the user adds slides
before) ?

Thank you
Gil

Sub updateHyperlinks()

   Dim s As Slide
   Set s = ActivePresentation.Slides(2)

   With s.Shapes("Rectangle 4")
       .ActionSettings(ppMouseClick).Hyperlink.Delete
       With .ActionSettings(ppMouseClick).Hyperlink
       .Address = ""
       .SubAddress = "joe report"
       .ScreenTip = ""
       .TextToDisplay = ""
       End With
   End With
.
.
.
David M. Marcovitz - 24 Apr 2008 15:46 GMT
Just because the slide's name is Slide 2, doesn't mean that it is

.Slide(2)

It is now a different slide number. If you know the name of the slide,
then use that, as in:

.Slide("Slide 2")

If you don't know the name of the slide, then you can set it. I think it
is easier in 2007, but in 2003 or earlier, you need code to set the
name. Look for Example 8.7 on my site to get code for getting and
setting slide names:

http://www.PowerfulPowerPoint.com/

Click on "Examples by Chapter" and "Chapter 8."

--David

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

"Gil" <snoopy2003@walla.com> wrote in news:fuoh86$gd2$1
@news4.netvision.net.il:

> Hello,
>
[quoted text clipped - 28 lines]
> .
> .
 
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.