问题
I am having trouble using Visio 14.0 Drawing Control (Visio 2010) in Visual Studio 2012. It looks like there is a bug in VS2012 using this control. You can reproduce this easily by starting a new win form application, then from toolbox choose Microsoft Office 14.0 Visio Drawing Control and drop it on the form. As soon as you drop it you will get this error:
"error hresult e_fail has been returned from a call to a com component"
回答1:
Just in case someone else have the same problem, this is a Visual Studio 2012 bug (MS working on it). A workaround is to append the Office installation directory (usually it is "C:\Program Files (x86)\Microsoft Office\Office14") to the PATH environment variable.
来源:https://stackoverflow.com/questions/12095726/visio-drawing-control-fails-in-visual-studio-2012