Log in

View Full Version : Word 2007: Selection.ShapeRange.PictureFormat.Brightness fails



k93
02-10-2015, 11:08 PM
I have been trying to use a very simple macro in Word 2007:
--------------------------------------------------------------------------------
Sub FmtPic11()
Selection.ShapeRange.PictureFormat.Brightness = 0.5
End Sub
--------------------------------------------------------------------------------

However, when I select a pasted screenshot image and run the Macro I get the following error:

Run-time error "5":
Invalid call or Argument

What am I missing?

gmayor
02-10-2015, 11:46 PM
By default Word pastes in-line, so you would need


Selection.InlineShapes(1).PictureFormat.Brightness = 0.5

k93
02-11-2015, 02:27 PM
Thanks, that did it.