PDA

View Full Version : Compress pictures problem



phreeq
08-23-2012, 09:01 AM
I'm having a bit of a problem with a macro that I'm writing for a client. The problem I have is that some of their users are running Word 2003 and some are running Word 2010. Due to this, I developed their template in 2003 and then I've been testing in both versions of Word.

The particular macro that isn't working is one to compress pictures. When it's run in 2003, everything works flawlessly, but it doesn't do anything in 2010. Here is the code:

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

I did run it without the sendkeys option, just to step through the process, and that's when I found where the problem is. If I were to manually run the compress pictures command in 2010, the dialogue box is different than the one used in 2003, but when I use the macro, what shows up in 2010 is the 2003 version of the box. From what little I've been able to find, the control id number is the same between the two.