Visio Guy

Visio Discussions => Programming & Code => Topic started by: ronny_mattus on April 18, 2014, 11:20:19 PM

Title: VBA to lower picture quality in org chart
Post by: ronny_mattus on April 18, 2014, 11:20:19 PM
Hi,

I'm making an org chart with many employees. I can generate the chart with the wizard, but if I add pictures, Visio tends to crash. I ended up generating the org chart with the wizard and then added the pictures using vba and the ChangePicture function. This works well enough to solve the crashing problem. However, for larger JPEG images (300KB or larger), many of them don't seem to show up. If they do, they tend to randomly disappear and reappear when I go through the different pages of the chart and come back to it. Is there a way to lower the picture quality using vba before or after putting them on the chart?

(Using Visio 2013)

Thanks,
Ronny
Title: Re: VBA to lower picture quality in org chart
Post by: Yacine on April 18, 2014, 11:34:21 PM
Wouldn't it make sense to make a set of reduced size pictures outside Visio. eg with MS picture manager. It can do batches, so the whole operation is a matter of minutes.
Title: Re: VBA to lower picture quality in org chart
Post by: ronny_mattus on April 18, 2014, 11:53:08 PM
Thanks for the reply. And yes, that would make sense. But at the moment, I am only allowed access to the pictures to make the chart. I am not authorized to make changes to them directly.

Assuming I can't re-size the pictures outside of Visio, is there a way to do the same thing in Visio using vba?
Title: Re: VBA to lower picture quality in org chart
Post by: Yacine on April 19, 2014, 07:51:37 AM
Quote from: ronny_mattus on April 18, 2014, 11:53:08 PM
I am not authorized to make changes to them directly.
I would use copies of the originals.
Title: Re: VBA to lower picture quality in org chart
Post by: ronny_mattus on April 19, 2014, 04:30:52 PM
Can't believe I didn't think of that. Thanks, I'll do that.
Title: Re: VBA to lower picture quality in org chart
Post by: Yacine on April 19, 2014, 08:57:31 PM
LOL