title: How to check if a PowerPoint file is open?
body: <p>I am trying to create a MS Word macro to check and see if a specific powerpoint file is open. If it is then I want it to go to next, but if not then open the file.</p>
  
  <pre><code>Public Sub CommandButton1_Click()
  Dim pptApp As Object
  Dim pptPres As String
  'Dim nSlide As PowerPoint.Presentation
  Dim folderPath, file As String
  
  folderPath = ActiveDocument.Path &amp; Application.PathSeparator
  file = "Huntington_Template.pptx"
  
  Set pptApp = CreateObject("PowerPoint.Application")
  
  If pptApp.presentations(file).Enabled = True Then
      GoTo cont
  Else
      pptApp.Visible = True
      pptApp.presentations.Open (folderPath &amp; file)
  End If
  </code></pre>
  
  <p>cont:</p>
  
  <pre><code>End Sub
  </code></pre>