![]() |
#1
|
|||
|
|||
![]()
Hi folks,
I'm a novice to VB and, despite extensive searching, can't figure the code to 1) LockAspectRatio = True 2) WrapFormat.Type = wdWrapSquare 3) ShapeHeight = InchesToPoints(0.6) on the selected picture. It would save a massive amount of time when inserting images into Word. Essentially, I'll setup a keystroke to activate the finished code as a macro. ... if that's the best way to do it...? Thanks! |
#2
|
||||
|
||||
![]()
Try:
Code:
Sub Demo() Dim Shp As Shape With Selection If .InlineShapes.Count > 0 Then Set Shp = .InlineShapes(1).ConvertToShape ElseIf .ShapeRange.Count > 0 Then Set Shp = .ShapeRange(1) End If End With If Not Shp Is Nothing Then With Shp .LockAspectRatio = True .WrapFormat.Type = wdWrapSquare .Height = InchesToPoints(0.6) End With End If Set Shp = Nothing End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
resize pictures, wrap |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Yonatanx3 | Word VBA | 2 | 01-20-2019 03:49 PM |
![]() |
marconexcel | Drawing and Graphics | 2 | 02-02-2018 05:01 PM |
![]() |
ShankedS | Word Tables | 2 | 11-16-2015 04:27 PM |
![]() |
FaizanRoshan | Word VBA | 7 | 10-18-2015 03:34 PM |
![]() |
Seafarer | Word | 3 | 12-28-2011 05:35 PM |