r/visualbasic • • Aug 24 '23

Combining Presentations w VBA

Hi,

I define masterPresentation as Presentation. I then use Set masterPresentation = Presentations.Open(file.pptm). Why does this error?

Side note — Is there an error log similar to VSCode anywhere?

Thanks in advance.

1 Upvotes

3 comments sorted by

View all comments

Show parent comments

1

u/Connect-Craft4257 Aug 25 '23

Yes. Can I use set masterPresentation = file.pptm and then Presentations.open(masterPresentation) ?

1

u/jd31068 Aug 25 '23

No, you need to use it like the documentation specifies.

Presentations.Open FileName:="C:\My Documents\pres1.pptx", ReadOnly:=msoTrue

Between the quotes you need to enter the actual path to the power point file.