Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerpoint Slide Index # / Name

Status
Not open for further replies.

f64

Technical User
May 23, 2003
24
US
I am writing a VB subroutine to copy charts from Excel and paste them into an existing PowerPoint Slide Presentation. Do I remember reading somewhere that it is possible to refer to a PowerPoint slide by a name, rather than the index number? I am trying to anticipate slides being inserted or re-ordered, and so I’m trying to write the code to find the target slide even though it may change position in the order. But I can’t find an option anywhere in PowerPoint to name a slide. Is the name the title entry?
 
The slides are named "Slide1", "Slide2" etc.

:)


Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
f64 - I want to do exactly the same thing. I started writing some code today at work (cant access it because I am at home now). I have only managed to get as far as opening powerpoint and selecting a specific slide using slide1 slide2 etc so I would be interested to see any code you have so far (if you are happy to share it). I give a 33 slide presentation every month and waste lots of time copying and pasting in my graphs. I tried inserting as links, but that caused havoc, continually asking me to enable macros (I dont want to change my security settings) eventually locking up my pc.
I will watch tis thread closely looking for any help or tips.
 
Back at work now :) this is what I have so far, which will open ppt and select slide2.

Sub Open_Powerpoint()

Dim pptApp As PowerPoint.Application
Set pptApp = New PowerPoint.Application
pptApp.Visible = True
filetoopen = Application.GetOpenFilename() 'choose the powerpoint presentation to open
If filetoopen = False Then
Exit Sub
End If
pptApp.Presentations.Open filetoopen 'opens the selected ppt file
pptApp.ActivePresentation.Slides(2).Select 'selects slide2

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top