Macro to Rotate Image in Word 365

Ann Allen 21 Reputation points

Ho do I write a macro to rotate an image in Word 365.

Recording the actions doesn't work.

I have many images that I want to rotate, not all at once, but selectively.


Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
876 questions
{count} votes

Accepted answer
  1. Viorel 110.1K Reputation points

    Check a macro that rotates the current (selected) picture by 45°:

    Sub Macro1()
        Const angle = 45
        Dim s As Shape
        For Each s In Selection.ShapeRange
            s.IncrementRotation angle
        Dim inl As InlineShape
        For Each inl In Selection.InlineShapes
            Set s = inl.ConvertToShape
            s.IncrementRotation angle
    End Sub

    You can also assign a value to s.Rotation.

    Backup your document before tests.

2 additional answers

Sort by: Most helpful
  1. Ann Allen 21 Reputation points

    Thank you, but I'd already found those, and they are still not helping.
    I don't want/need to insert/resize nor is height dependancy an issue
    I don't want to increment, and even so, it doesn't work for me
    This one ends up rotating multiple images - gathered in a shaperange
    Don't want to rotate multiple images
    This one imports the picture, checks height/width - far more than I want it to do. I tried extracting parts, but still can't get it to work.

  2. Ann Allen 21 Reputation points

    Thanks John, but I can't believe it is so difficult.

    With a mouse it's easy: click PictureFormat, click the rotate button, click rotate right. All I want to do is turn that into Ctrl-Shift-R.

    3 mouse strokes might seem like a small job, but with many pictures to rotate, I'd like an easier way. 15 years ago I could write macros all day long in Lotus 1-2-3.

    0 comments No comments