title: VBA fails when opening PowerPoint presentation on Windows 7
body: <p>I wrote a VBA macro in Excel 2007 on Windows XP to copy data from an excel spreadsheet into a powerpoint presentation.
  When this macro enabled spreadsheet was run on a fresh install of Windows 7 it fails.
  So I pulled out the code that fails to pin point the problem and it seems to fail when trying to open an existing powerpoint file. I have tried running this code in both Office 2010 and Office 2007.</p>
  
  <p>The code I am trying to use it (just the problem parts shown below)</p>
  
  <pre><code>Sub test()
     Dim PowerPointApplication As PowerPoint.Application
     Dim PowerPointFile As PowerPoint.Presentation
  
     Set PowerPointApplication = CreateObject("PowerPoint.Application")
     Set PowerPointFile = PowerPointApplication.Presentations.Open("PATH_TO_FILE\test.pptx")
  End Sub
  </code></pre>
  
  <p>The macro fails on the Presentations.Open line above with the following error</p>
  
  <pre><code>Run-time error '-2147467259 (80004005)':
  Method 'Open' of object 'Presentations' failed
  </code></pre>
  
  <p>I have already enabled the PowerPoint 12.0 Object Library in the references settings in the VBEditor for the spreadsheet. All the other references match exactly with the file that runs without error on my Windows XP box.</p>
  
  <p>I have looked all over the web for an answer and cant find anything. I read something about Windows 7 and offline files, so tried turning that off but it didnt help.</p>
  
  <p>I am logged in as an administrator user as well, and tried moving the pptx that I am opening to other directories as well with no success.</p>
  
  <p>I am running the following version of Windows:</p>
  
  <pre><code>Windows 7 Professional
  Service Pack 1
  64 Bit
  </code></pre>
  
  <p>Any help would be appreciated!</p>