LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect a number to a picture bank and import that picture to exce Dennis Hedo Excel Discussion (Misc queries) 1 March 22nd 10 02:17 PM
Pagesetup.Orientation need VBA routine to "Best Guess" Orientation [email protected] Excel Discussion (Misc queries) 3 November 10th 09 05:53 PM
Delete earlier 'Picture' version when new picture copied in JDaywalt Excel Programming 1 March 22nd 08 01:23 AM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM


All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"