• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scale


  • Subject: Re: scale
  • From: Andrew Oliver <email@hidden>
  • Date: Mon, 20 Feb 2017 09:14:39 -0800

There is no ‘scale’ property of a picture's ‘height’. Excel’s dictionary states that ‘height’ is a real, and therefore has no further properties.

Why not just do something like:

tell application id "com.microsoft.Excel"
tell active sheet of active workbook
tell picture 1
set lock aspect ratio to false
set h to get height
set height to h * 1.5
end tell
end tell
end tell

(you need to unlock the aspect ratio in order to scale width and height independently)

Andrew
:)

On Feb 20, 2017, at 3:34 AM, Julien Battist <email@hidden> wrote:

Hi all,
 
It seems to be impossible to get the scale factor of a place picture in Excel 2011.
I am able to place an image but I need to make it proportional. So width size is fixed, height size need to be proportional adapted.
Any help is much appreciated.
 
tell application id "com.microsoft.Excel"
    tell active sheet of active workbook
        tell picture 1
            get height
            --- 150.0
            get scale of height
            --- missing value
        end tell
    end tell
end tell
 
Many thanks,Julien
 
 
Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
  • Follow-Ups:
    • Re: scale
      • From: Julien Battist <email@hidden>
References: 
 >scale (From: Julien Battist <email@hidden>)

  • Prev by Date: scale
  • Next by Date: Re: scale
  • Previous by thread: scale
  • Next by thread: Re: scale
  • Index(es):
    • Date
    • Thread