The title explains what I'm having difficulty doing. Is it possible to do this ?
I believe that I copied the Powerpoint file path correctly and it is
The code block that follows I copied from CoPilot's chat GPT and is in the forms Initialize Event:
Followed this instruction:
I then tried using a Webrowser1 control in the code and ran that. It didn't work either.
run time error message both times is "Object doesn't support this property or method"
The Powerpoint workbook is on my hard drive, so its local, so I don't know why the suggestion for a Webrowser control, unless
a Webrowser control has portal functionality and can be used for other than accessing websites..
All I want to do is just display Powerpoint slides on an Excel userform and use navigation
buttons to advance from slide to slide.
If this can be done, why so difficult? Should be relatively straightforward.
Could anyone help me with this? Any help and guidance will be greatly appreciated.
Thanks, cr
I believe that I copied the Powerpoint file path correctly and it is
Code:
Set pptPres = pptApp.Presentations.Open("C:\Users\car19\OneDrive\Desktop\SHOULD WE BELIEVE IN THE RAPTURE LATEST\A SHOULD WE BELIEVE IN THE RAPTURE
Code:
Private Sub UserForm_Initialize()
Dim pptApp As Object
Dim pptPres As Object
Dim pptSlide As Object
' Create a new instance of PowerPoint application
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Visible = True
Set pptPres = pptApp.Presentations.Open("C:\Users\car19\OneDrive\Desktop\SHOULD WE BELIEVE IN THE RAPTURE LATEST\A SHOULD WE BELIEVE IN THE RAPTURE ONE.pptx")
' Open the PowerPoint presentation
'' Set pptPres = pptApp.Presentations.Open("C:\path\to\your\presentation.pptx")
' Embed the PowerPoint presentation in the Object Frame
Me.Frame1.Class = "PowerPoint.Slide"
Set pptSlide = pptPres.Slides(1)
Me.Frame1.Object = pptSlide
End Sub
- Add an Object Frame:
- In the UserForm, add an Object Frame control (also known as OLEObject).
- This control will be used to embed the PowerPoint presentation.
I then tried using a Webrowser1 control in the code and ran that. It didn't work either.
run time error message both times is "Object doesn't support this property or method"
The Powerpoint workbook is on my hard drive, so its local, so I don't know why the suggestion for a Webrowser control, unless
a Webrowser control has portal functionality and can be used for other than accessing websites..
All I want to do is just display Powerpoint slides on an Excel userform and use navigation
buttons to advance from slide to slide.
If this can be done, why so difficult? Should be relatively straightforward.
Could anyone help me with this? Any help and guidance will be greatly appreciated.
Thanks, cr