title: How to open an Outlook email template with Excel VBA?
body: <p>I am trying to open an Outlook 2010 email template with Excel.  I get the following error:</p>
  <blockquote>
  <p>&quot;Run-time error '-2147287038 (80030002)':<br />
  Cannot open file:<br />
  C:\My\Path\MyTemplate.oft. The file may not exist, you may not have permission to open it, or it may be open in another program.  Right-click the folder that contains the file, and then click Properties to check your permissions for the folder.&quot;</p>
  </blockquote>
  <p>The file exists (in the right place), I checked permissions (as far as I know how), and the file is not open.</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Mail_experiment()
      Dim OutApp As Outlook.Application
      Dim OutMail As Outlook.mailitem
      Set OutApp = CreateObject(&quot;Outlook.Application&quot;)
      Set OutMail = OutApp.CreateItemFromTemplate(&quot;C:\My\Path\MyTemplate.oft&quot;)
      On Error Resume Next
      With OutMail
          .to = &quot;myEmail@aol.com&quot;
          .CC = &quot;&quot;
          .BCC = &quot;&quot;
          .Subject = &quot;This is my Subject line&quot;
          .Send
      End With
      On Error GoTo 0
      Set OutMail = Nothing
      Set OutApp = Nothing
  End Sub
  </code></pre>