Hi all,
I have a PowerPoint Object embedded in excel sheet1.
(=EMBED("PowerPoint.Show.12","")
The idea is to edit the PowerPoint presentation from within Excel using VBA in Excel:
Copy a range from Excel and Paste into a PowerPoint slide
When using Verb:=xlOpen, the range gets inserted into the PowerPoint sheet and also shows in the embedded object, so far so good. But the screen gets updated whilst doing that.
If possible, I do not want Excel to show all the activity involved during this open, copy-paste process.
Application.ScreenUpdate=false does not help with this.
I’ve tried Verb:=xlPrimary, but that opens PowerPoint in the slide show mode!
Any suggestion how to edit an embedded PowerPoint file from within Excel VBA, without showing all the screen updates?
Thank you kindly!
Alice
I have a PowerPoint Object embedded in excel sheet1.
(=EMBED("PowerPoint.Show.12","")
The idea is to edit the PowerPoint presentation from within Excel using VBA in Excel:
Copy a range from Excel and Paste into a PowerPoint slide
When using Verb:=xlOpen, the range gets inserted into the PowerPoint sheet and also shows in the embedded object, so far so good. But the screen gets updated whilst doing that.
If possible, I do not want Excel to show all the activity involved during this open, copy-paste process.
Application.ScreenUpdate=false does not help with this.
I’ve tried Verb:=xlPrimary, but that opens PowerPoint in the slide show mode!
Any suggestion how to edit an embedded PowerPoint file from within Excel VBA, without showing all the screen updates?
Thank you kindly!
Alice
VBA Code:
Sub EmbedPowerPoint()
Dim myObject As OLEObject
Dim p As PowerPoint.Presentation
Dim rng As Range
Application.ScreenUpdating = False
Set myObject = Sheet1.OLEObjects("Object 1")
'myObject.Verb Verb:=xlOpen '
myObject.Verb Verb:=xlPrimary
Set p = myObject.Object
Set rng = Sheet3.Range("A1:F7")
rng.Copy
Set MySlide = p.Slides(1)
MySlide.Shapes.PasteSpecial DataType:=2
[a1].Select
Set myObject = Nothing
Application.ScreenUpdating = True
End Sub