View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jess Jess is offline
external usenet poster
 
Posts: 60
Default Picture Orientation

I have an excel sheet that inserts pictures store in folder. Just before
inserting the picture I need to know wether the picture orientation is
landscape or portrait. How can I know that without inserting the actual
picture?

This is the code I use; it determines the pic orientation AFTER inserting
the picture. I would like to avoid inserting the picture; I just need the
orientation.

Set pic = xlApp.ActiveSheet.Pictures.Insert(PictureName)

If pic.ShapeRange.height <= pic.ShapeRange.width Then
PicOrientation = "Landscape"
Else
PicOrientation = "Portrait"
End If

How can I accomplish this?