View Full Version : [SOLVED:] how to have a macro resize a picture
danmc58
04-11-2016, 05:17 AM
I'm trying to make a macro that resizes an image that I am pasting.
So when I go to the macro recorder, pick the image and then resize it, for some reason it doesn't record the size change.
Can someone assist?
danmc58
04-11-2016, 06:23 AM
Sub Macro2()
'
' Macro2 Macro
'
'
'Sub ResizePics()
Dim shp As Word.Shape
Dim ishp As Word.InlineShape
If Word.Selection.Type <> wdSelectionInlineShape And _
Word.Selection.Type <> wdSelectionShape Then
Exit Sub
End If
If Word.Selection.Type = wdSelectionInlineShape Then
Set ishp = Word.Selection.Range.InlineShapes(1)
ishp.LockAspectRatio = True
'ishp.Height = InchesToPoints(1.78)
ishp.Width = InchesToPoints(4)
Else
If Word.Selection.Type = wdSelectionShape Then
Set shp = Word.Selection.ShapeRange(1)
shp.LockAspectRatio = True
'shp.Height = InchesToPoints(1.78)
shp.Width = InchesToPoints(4)
End If
End If
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.