Hi,
We currently encountered a problem automating Visio (2010) under Windows Server 2012. Our job is simply open a Visio diagram, make some small changes (Shape Texts), and then export it to SVG and HTML.
It has been working fine in Windows Server 2003, 2008 and 2008 R2. But in Windows Server 2012, we got this error:
System.Runtime.InteropServices.COMException (0x86DB03E7): An exception occurred. at Microsoft.Office.Interop.Visio.PageClass.Export(String FileName)
Some notes:
1. We run our job as Windows Service under a specific service account (also added as Local Administrator on the server)
2. We can't find any information about the error: 0x86DB03E7. It is a mystery.
3. When trying to find solutions on two Windows Server 2012 instances running in Azure, we managed to get it through by wrapping automation code inside an STA Thread. And after that, the error has just gone, even when we switched back to the original automation code.
4. When trying to test same work-around (using STA Thread) on an Windows Server 2012 instance hosted in a Hyper-V. It didn't help. So we replaced the Window Service with a Console Application (to run in interactive mode), then automation code worked. However, as long as we switch back to use Windows Service, same error happens.
Does anyone know what the error 0x86DB03E7 is about? What change in Windows Server 2012 could be the cause of this? Or how should we modify our code in order to get it work under Windows Server 2012?
P.S.: We are aware of Server-side Automation warning from MS, so please discard any general advise about that. Our product's main features depend a lot on Visio (and other Office Applications) which is by far there is no such a diagramming tool supporting interoperabilities as we need like Visio.
Thanks in advance.
Best Regards,
Duy