I have a VBA script which takes a folder of images, imported through inlineshapes.addpicture, compares the height/width of the photo then rotates the page for that image to match the photos orientation.
For a large portion of photos this code works fine.
However, for some photos, the image will import to the doc as portrait but the height/width values would suggest it is landscape and set the page to landscape. This could also happen the other way round (i.e. landscape as portrait)
This makes no sense as I can see the image is in the portrait orientation in the document but when checking size/position sure enough the values are showing as landscape.
Does anyone know why this would be and how I could check the value of height/width based on how it is showing in the document?
It’s like word is importing as a rotated photo?