Hi all,
I am wanting to compress pictures in word 2010 using VBA. I have already scaled the inserted pictures, but need to still reduce the overall size of the document.
I am using the below code to try and accomplish this:-
Code:
With Application.CommandBars.FindControl(ID:=6382)
SendKeys "%A%W{Enter}"
.Execute
End With
but the sendkeys doesn't seem to be working correctly. (Word 2010 32bit, win 7 64bit)
When I do it manually I get a different compress pictures dialog box (first attachment) verse when being called in code (older possible 2003 version), even thought they both share the same ID of 6382.
I understand that it should really be done outside of word, but the end user, due to company policies is not able to install decent graphical software to compress pictures. They have to put the picture into word as a requirement of the report that are doing, so I was hoping to do it there.
I have also changed the default compression of images in the word options so that all new documents are created with a reduced dpi, but the document is still too large.
Is there a work around in vba to achieve the same result.