Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Cancel
6
  • 4
    On Error Resume Next is 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. Commented Jan 31, 2017 at 21:43
  • 1
    Can you edit your question to clarify exactly what that code snippet is? Is it your attempt at making an invisible 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. Commented Jan 31, 2017 at 21:45
  • Also... you seem to have the PowerPoint library referenced (As PowerPoint.Application does compile, right?) - so why then are you late-binding the creation of the application instance? Just do Set pptApp = New PowerPoint.Application. Commented Jan 31, 2017 at 21:48
  • To clarify, Err.Clear is not the same thing as On Error GoTo 0. The first just wipes the logged error - the second one actually re-enables error trapping. Commented Jan 31, 2017 at 21:51
  • Thanks. I edited my code. I need to have the On error Resume Next because i paste some pictures on the slides and it gives me an error without that code, but wth it it pastes perfectly. Now, with the edited code, the presentation is still visible! Commented Feb 1, 2017 at 13:29