3

I am trying to export a page from a Visio document to a png file using Visio 2003. The Export method works, but I haven't found any way to set the desired output resolution.

The documentation mentions what it uses the defaults, but nothing on how to change them:

The Export method uses the default preference settings for the specified filter and does not prompt the user for non-default arguments.

In Visio 2010, it is possible to set these properties via SetRasterExportSize, but that property isn't available in Visio 2003.

So, my question:

Is there any way to set the png output resolution in Visio 2003?

1 Answer 1

2

Not directly. The Export method for 2003/7 simply respects the last settings that were used via the UI (ie File / Save As from memory) for a given session.

One workaround suggested in Graham Wideman's book (Visio 2003 Developers Survival Pack) is to use the SendKeys method, although as he points out this is not a very robust option. For his book he created a COM component (DAKbdEventLib) that avoids some of the problems of SendKeys. I not sure if the book is still available (it's still very relevent to Visio 2010), but you could have a look here:

http://www.diagramantics.com/v11dsp/index.htm

As you point out the ability to control export settings via code, only appeared in the api in the 2010 version.

Hope that helps

Best regards

John

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.