That looks like some code I posted at:
http://social.msdn.microsoft.com/For...?forum=worddev
The code isn't meant to display a dialogue; it merely sets Word's compression to 'Web' resolution (96dpi). Changing the SendKeys code to:
SendKeys "%A%P{Enter}"
would sets Word's compression to 'Print' resolution (200dpi). That code works for Word 2003 & earlier, but not for Word 2007 & later. Although Word 2007 & later contain the same command bar, it doesn’t work. Indeed Word 2007 & later contain two command bars with the same ID - as your post shows - but it’s only the older non-functioning one the code activates. Since there is no difference in the IDs, there is no way to control which version Word serves up. According to the VBA help file:
Quote:
If the CommandBars collection contains two or more controls that fit the search criteria, FindControl returns the first control that's found.
|
Although one can also specify other attibutes to differentiate one control from another (e.g. Type:=1 for a button, or Tag:= something), I can't find anything to differentiate them. Even using the Visible:=True parameter with the Pictures Tools tab visible doesn't help. You'll probably need to find another method.