Can you not loop through all open presentations and check the .fullname
property against the path to your target file?
Something like:
Dim opres as Presentation
For each opres In Application.Presentations
If opres.FullName = "xyz" Then msgbox "It's open"
Next opres
(Air code I haven't tried this!)
-------------------------------------------
Amazing PPT Hints, Tips and Tutorials
http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
> I'm writing a macro which needs to create an instance of powerpoint if there
> isn't one, then open a selected presentation if it isn't already open. I've
[quoted text clipped - 4 lines]
>
> Grateful for advice.
simonc - 22 May 2008 14:16 GMT
Thank you for this. It was so simple somehow I couldn't see it.
I have another query:
I have successfully referenced Microsoft Excel to be able to use
GetOpenFileName (I'm still using Office 2000). When I use this in an Excel
macro it remembers the last folder I opened with the macro, but in this
Powerpoint macro it doesn't, and defaults to the My documents folder. Is
there something else I need to do to get the macro to remember the last
folder?
Many thanks
> Can you not loop through all open presentations and check the .fullname
> property against the path to your target file?
[quoted text clipped - 22 lines]
> >
> > Grateful for advice.