PDA

View Full Version : How to Check if PowerPoint Object is Open; If so, do not Open another and Use Opened



nas8424
09-04-2018, 03:12 PM
Code below opens a new PowerPoint. However I need to first check if the powerpoint is already opened (in case this logic has ran before some place else), and if so, simply append to the powerpoint (instead of creating a new one every time). Thoughts?



Dim objPPT as Object
objPPT.Presentations.Open ThisWorkbook.Path & "\Test.ppt"

I'm using Excel 2010 if that helps. Thanks

John Wilson
09-05-2018, 06:23 AM
Are you checking if Powerpoint is open or that file test.ppt is open?

nas8424
09-05-2018, 08:15 AM
Would need to check if Test.ppt is open. If it is, not to open another one, and simply add to it...

John Wilson
09-05-2018, 08:52 AM
Assuming that PowerPoint is open loop through all the open presentations and check for the name test.pptx