Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Find Object "Lock Picture Aspect Ratio"
Can someone please tell me the object for "lock picture aspect ratio" for
pictures used in comments? I want to programmatically prevent a photo from being distorted after I add it to a comment box using the following code: Selection.AddComment.Shape.Fill.UserPicture (Selection.Value) I have found Selection.Comment.Shape.LockAspectRatio. But that only locks the aspect ratio of the comment box itself, not the photo. This is done conventionally in Excel in the following manner: [Right-click comment border] Format Comment€¦ Colors and Lines [tab] Fill: Color: Fill Effects€¦ Lock picture aspect ratio. Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Find Object "Lock Picture Aspect Ratio"
Lazzaroni,
Seems that MS forgot to include that in the Object Model. I cannot see a way to achieve it directly in code. If it is important to you, you could get the dimensions of jpg before you load. Size your comment frame according then insert. NickHK "Lazzaroni" wrote in message ... Can someone please tell me the object for "lock picture aspect ratio" for pictures used in comments? I want to programmatically prevent a photo from being distorted after I add it to a comment box using the following code: Selection.AddComment.Shape.Fill.UserPicture (Selection.Value) I have found Selection.Comment.Shape.LockAspectRatio. But that only locks the aspect ratio of the comment box itself, not the photo. This is done conventionally in Excel in the following manner: [Right-click comment border] Format Comment. Colors and Lines [tab] Fill: Color: Fill Effects. Lock picture aspect ratio. Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"method 'execute' of object 'find' failed" | Excel Discussion (Misc queries) | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
Scatter charts -- can I lock in a 1:1 aspect ratio for axes? | Charts and Charting in Excel | |||
Move a "picture" object | Excel Programming |