Can Python win32com use Visio (or any program) without a GUI?

I have a Python script using win32com to open a Visio file and upload each tab as files .png. He briefly blinks Visio gui on the screen when he does this. Is there a way to do this in the background without loading the Visio window?

import win32com.client
visio = win32com.client.Dispatch("Visio.Application")
visio.Documents.Open(filepath)
...
visio.Quit()
+3
source share
2 answers
visio = win32com.client.Dispatch("Visio.InvisibleApp")

should create an invisible instance of Visio.

See http://msdn.microsoft.com/en-us/library/aa201815(v=office.10).aspx

+4
source

You can control the visibility of the application using the property Visible.

Example: Hide Visio Application Window

visio.Visible = 0

Example: displaying a Visio application window

visio.Visible = 1

, . . , .

+1

All Articles