PDA

View Full Version : Compress pictures in word 2007



byronmunya
09-14-2010, 12:48 AM
I have code that inserts a number pictures in a word document from a folder, I want to reduce the resolution of the pictures using VBA in word 2007 so that I have a small file size that I can email to clients. How do I do it using VBA.

fumei
09-14-2010, 01:05 PM
What have you tried so far?

macropod
09-14-2010, 05:34 PM
Hi Gerry,

Unfortunately, this is one of those processes not exposed to the vbe.

Byron: Here's some code for you to try -

Sub CompressPics()
With Application.CommandBars.FindControl(ID:=6382)
SendKeys "%A%W{Enter}"
.Execute
End With
End Sub

byronmunya
09-17-2010, 03:54 AM
I managed to find the code to compress pics. Thank you for your help.

fumei
09-20-2010, 10:10 AM
And, what, it is diifferent from what macropod posted?

If so, you have managed to find an alternative, then please be polite and post what you found.

If it is the same as macropod's suggestion, please tell us.