How to rotate photo in word

broken image

ReDim Preserve RotationArray(0 To UBound(RotationArray) + 1) As Variant ReDim Preserve RotationArray(0 To 0) As Variant Instead of rotating every Word.Shape individually, I gather them all in a ShapeRange via their Indexes (or whatever the plural is on that one) and rotate them all at once. Activate and the like but nothing seems to work. Additionally if I set the visibility for the Word-Document to TRUE, debug through, and fullscreen the Word-Document before the script performs the rotation, it will rotate any Word.Shape every time. Although I the first Word.Shape meeting the criteria will be rotated, any others will not.

broken image

'- Kontrolle ob rotiert oder natives Querformat. '- Kontrolle ob Bild im Querformat vorliegt. SiAspectRatio = oShapeToCheck.Height / oShapeToCheck.Width If oShapeToCheck.Height > 0 And oShapeToCheck.Width > 0 Then '- Seitenverhältnis und Rotation berechnen.

broken image

Here's how the loop is designed: For Each wrdShape In wrdDoc.ShapesĪnd now the part that's acting up: Private Function CheckFormat(oShapeToCheck As Word.Shape) As Boolean Here's how the Word-Document comes to be (opens a PDF with one Shape per page): Set wrdDoc = (FileName:=sToSaveAs, Visible:=False)

broken image

I need to rotate Word.Shapes in a single Word-Document, but my script will only rotate the first one, and i can't figure out why.