Hello. I have the following code which opens a PPT from Excel. The code works, however, if the file is already open, the macro will reopen the PPT as a read only. Can someone please help me add code that looks to see if file is already open? If it is, I'd like a msgbox that say "file already open". I tried some combinations but didn't work. The following code just opens file. Thanks!
Sub OpenPPTX_File()
Dim PowerPointApp As Object
Dim Directory As String
Dim PPTFile As String
Directory = Range("Input_PPTFileDir")
PPTFile = Range("Input_PPTFileNm")
Set PowerPointApp = CreateObject("PowerPoint.Application")
PowerPointApp.Presentations.Open (Directory & PPTFile)
PowerPointApp.Visible = True
End Sub
Bookmarks