With ActiveWindow.Selection.ShapeRange If .Type = ksoPicture Then .Rotation = 45 Else .Rotation = 90 End IfEnd With