Save selected shapes as jpg

M

Markus Breugst

Dear all,

I would like to save the currently selected shapes of one drawing page as
JPG via automation (C#).

I am using the method
visioDocument.Pages[1].Export("File.jpg");

Problem: This method saves the entire(!) page content and not only the
currently selected shapes.

If I select some shapes and manually(!) invoke the Visio menu item "file ->
save as" and select JPG as file format, then Visio saves just the selected
shapes. And that's exactly what I want to achieve via automation.

Any ideas how to do this?

Thanks in advance & best regards,
Markus
 
P

Paul Herber

Dear all,

I would like to save the currently selected shapes of one drawing page as
JPG via automation (C#).

I am using the method
visioDocument.Pages[1].Export("File.jpg");

Problem: This method saves the entire(!) page content and not only the
currently selected shapes.

Try
....activeWindow.Selection.Export("File.jpg");
 
M

Markus Breugst

Thanks a lot, Paul! That's exactly what I needed.

Best regards,
Markus

Paul Herber said:
Dear all,

I would like to save the currently selected shapes of one drawing page as
JPG via automation (C#).

I am using the method
visioDocument.Pages[1].Export("File.jpg");

Problem: This method saves the entire(!) page content and not only the
currently selected shapes.

Try
...activeWindow.Selection.Export("File.jpg");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top