title: Activate window of another Visio instance
body: <p>Currently I have a file name stored in string called <strong>filename</strong>. The file stored in the string is currently open. Issue is, this file could some times be opened in another instance of Visio.</p>
  
  <p>I want to activate the file that is stored in filename string</p>
  
  <p>My current method does not capture this - The code below only checks if the filename exists among the current/one instance of Visio. </p>
  
  <pre><code>For Each objDoc In objVisio.Documents
    If objDoc.Name = filename Then
       objDoc.activate
   Exit for
    End If
  </code></pre>
  
  <p>Next</p>
  
  <p>How can I activate this file to bring it forward? </p>
  
  <pre><code>windows(filename &amp; " - Microsoft Visio").activate 
  </code></pre>
  
  <p>is not working either</p>
  
  <p>I've tried</p>
  
  <pre><code>Dim objVisio as Visio.Application
  Set objVisio = GetObject(filename).Application
  </code></pre>
  
  <p>which isn't working (maybe due to filename string only having the file name and not the entire file path as well)</p>
  
  <p>Any other brute force methods available out there?</p>
  
  <p>Any help is appreciated!</p>