header image

PowerShell and Visio – Opening a file

Posted by: | July 4, 2010 | No Comment |

If all you want to do is open a Visio drawing then the simplest way is to use

Start-Process test.vsd

This will open the file in Visio ready for you to start work on it.

If you want to open the file and work on it programmatically then we have a little bit more to do.

$visio = New-Object -ComObject Visio.Application
$doc = $visio.Documents.Open("C:\Scripts\Visio\test.vsd")

Now we have our drawing we can start to do stuff with it

under: Office 2010, PowerShellV2