SubAddress - VBA code

  • Thread starter Thread starter JEG
  • Start date Start date
J

JEG

I'm trying to make a link that will go to a specific slide in a specific
file -- based on the slide title. In the example below, the link should
go to the "Overview" slide in File1.ppt. So far when I click the link, it
does open File1.ppt but it does not go to the Overview slide. I thougth I
was following the right syntax for the SubAddress -- is there some other
way I'm supposed to name the slide other than using the slide title?

ActivePresentation.FollowHyperlink (Presentations("ABC_Pres.pps").Path &
"File1.ppt"), ("Overview")
SlideShowWindows(Index:=2).View.Exit

Thanks!
Jackie
 
Couple of things....

1) You can not run code from a viewer run presentation, so if you are going
to distribute this, forget it.

2) Watch for directory separators

3) Did you already name the slide "Overview" in File1.ppt? or is that just
the text in the title placeholder?

-----Begin sample code------------

Sub SomeOtherOverview()

Dim File1 As String

If Right(Presentations("ABC_Pres.pps").Path, 1) = "\" Then
File1 = "File1.ppt"
Else
File1 = "\File1.ppt"
End If

ActivePresentation.FollowHyperlink _
(Presentations("ABC_Pres.pps").Path & _
File1)
DoEvents
SlideShowWindows(1).View.GotoSlide _
ActivePresentation.Slides("Overview") _
.SlideIndex

End Sub
-----End sample code------------

--
Bill Dilworth
Microsoft PPT MVP Team
Users helping fellow users.
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of your questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
Thanks for your reply. I did not have the slide named correctly.

I am confused about what you mean about using code in a viewer run
presentation. Like if I put my files on a CD, I wanted to have someone be
able to use it from the CD.
 
If they are using the free PowerPoint Viewer, rather than the regular
version of PowerPoint, they will not be able to use anything with VBA.
The Viewer does not support VBA.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
OK -- thanks -- so as long as they have PowerPoint installed it should work
fine?
 
Well, they also have to have their macro settings set to Medium (and
click Enable macros when asked) or set to Low (not recommended, but they
won't be asked).
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top