Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image dimension 1

Status
Not open for further replies.

Johnny42

Technical User
Jul 13, 2004
127
CA
I'm using this to insert an image into a comment...

Set shp = rng.AddComment("")
shp.Shape.Fill.UserPicture "C:\me.jpg"

how can I detect the size of the image and resize it to 10% in scale ?
 
Hi Johnny,

This should do it ...
Code:
[blue]shp.Shape.Height = shp.Shape.Height / 10
shp.Shape.Width = shp.Shape.Width / 10[/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Thanks Tony,
But thats the problem,
When I insert the picture it sizes it to the default size of the comment...
So I wanted to resize the comment to 10% of the image origional size....
 

Code:
    With shp.Shape
        .Fill.UserPicture "D:\My Documents\My Pictures\m427cas1.gif"
        .LockAspectRatio = True
        .Width = .Width * 5
    End With

Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top