I want to know how I can create a new PPT from Excel VBA (I already have the code) but without seeing the app while it is creating. I have found some insights but it only works when it opens an existing PPT file, but I am creating a new file.
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim excelTable As Excel.Range
Dim SlideTitle As String
Dim SlideText As String
Dim SlideObject As Object
Dim pptTextbox As PowerPoint.Shape
Dim SlideNumber As String
On Error Resume Next
Set pptApp = New PowerPoint.Application
Err.Clear
Set pptPres = pptApp.Presentations.Add
pptPres.PageSetup.SlideSize = ppSlideSizeOnScreen
On Error Resume Nextis a particularly bad idea here IMO. If you can't create the PowerPoint app instance, your code should bail out, not keep running as if nothing happened.pptApp? Or an excerpt from the code that opens an existing ppt file? Because that code doesn't open anything at all, and seems to specify.Visible = False, so it's not clear how it connects with the actual question.As PowerPoint.Applicationdoes compile, right?) - so why then are you late-binding the creation of the application instance? Just doSet pptApp = New PowerPoint.Application.Err.Clearis not the same thing asOn Error GoTo 0. The first just wipes the logged error - the second one actually re-enables error trapping.