title: VBA replace file in open document (other than word/excel)
body: <p>We use PcSchematic for our electric drawings. And we use PDM to manage the revision. I would like to write into the pcschematic file with the current revision from PDM.</p>
  <p>A pcSchematic file can be opened with a notepad. so what I would like to do is:</p>
  <p><code>Dim filePath as string = &quot;C:\16368.04.PRO&quot;</code></p>
  <ol>
  <li>Open file with notepad <code>Process.Start(&quot;notepad&quot;, filePath)</code></li>
  <li>find and replace a line</li>
  <li>save</li>
  <li>close</li>
  </ol>
  <p>I have tried this:</p>
  <pre><code>Dim objFSO
  Dim objTS
  objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
  objTS = objFSO.OpenTextFile(filePath, 2)
  </code></pre>
  <p>From this <a href="https://stackoverflow.com/questions/10434335/text-file-in-vba-open-find-replace-saveas-close-file">Text file in VBA: Open/Find Replace/SaveAs/Close File</a></p>
  <p>but it only seems to work for .txt files</p>
  <p>Can anyone point me in the right direction?</p>