Use VBA to edit a slide within a slide during slide show

E

eldon.l.lehman

I would like to edit the slide in slide show view that had been pasted
in normal view. I have been using Shyam's code for MS Graph as a model,
but it is for normal view also.
(Some of the errors with my code have been commented at the point of
the problem.)
--begin Shyam's code--
Sub OpenInWindow()
' Assuming that the 2nd shape on the slide is an MS Graph object
With ActivePresentation.Slides(1).S­hapes(2).OLEFormat
.DoVerb 2 ' Open Verb
End With
End Sub
--end Shyam's code--

--begin my code--
Public Sub EditSmallSlide()
Dim pres As Presentation
Dim SldNo As Long
Set pres = ActivePresentation
SldNo = 2

'On slide 2 a OLE object("Object 4") has been pasted
' using edit,paste special, Microsoft Powerpoint slide object
'The object has two verbs, open(DoVerb 1) and edit(DoVerb 2)
With pres.Slides(SldNo).Shapes("Obj­ect 4").OLEFormat
.DoVerb 2
End With
'object 4 is a slide(slide 1) that was pasted
'on slide(1) is a shape, Rectangle 2, that is to be
'editted in slide show view

With ActivePresentation.Slides(1).S­hapes("Rectangle 2").TextFrame
.TextRange = "Purple"
End With

'Closing the object, no verb.
'With the recorder it is done with
' unselects for the shape and the object
End Sub
--end code--

Thank you,
Eldon
 
G

Guest

The line:
pres.Slides(SldNo).Shapes("Obj­ect 4").OLEFormat.Object

would give you access to the embedded presentation. Assign it to another
variable (say, embedded_pres) and use that variable to manipulate the
presentation embedded on the slide.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

I would like to edit the slide in slide show view that had been pasted
in normal view. I have been using Shyam's code for MS Graph as a model,
but it is for normal view also.
(Some of the errors with my code have been commented at the point of
the problem.)
--begin Shyam's code--
Sub OpenInWindow()
' Assuming that the 2nd shape on the slide is an MS Graph object
With ActivePresentation.Slides(1).S­hapes(2).OLEFormat
.DoVerb 2 ' Open Verb
End With
End Sub
--end Shyam's code--

--begin my code--
Public Sub EditSmallSlide()
Dim pres As Presentation
Dim SldNo As Long
Set pres = ActivePresentation
SldNo = 2

'On slide 2 a OLE object("Object 4") has been pasted
' using edit,paste special, Microsoft Powerpoint slide object
'The object has two verbs, open(DoVerb 1) and edit(DoVerb 2)
With pres.Slides(SldNo).Shapes("Obj­ect 4").OLEFormat
.DoVerb 2
End With
'object 4 is a slide(slide 1) that was pasted
'on slide(1) is a shape, Rectangle 2, that is to be
'editted in slide show view

With ActivePresentation.Slides(1).S­hapes("Rectangle 2").TextFrame
.TextRange = "Purple"
End With

'Closing the object, no verb.
'With the recorder it is done with
' unselects for the shape and the object
End Sub
--end code--

Thank you,
Eldon
 

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

Top