Microsoft Office Forums Wrap Square and Resize Selected Picture

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2019, 11:31 PM
modene1 modene1 is offline Wrap Square and Resize Selected Picture Mac OS X Wrap Square and Resize Selected Picture Office for Mac 2011
Novice
Wrap Square and Resize Selected Picture
 
Join Date: Jul 2015
Posts: 6
modene1 is on a distinguished road
Smile Wrap Square and Resize Selected Picture

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!
Reply With Quote
  #2  
Old 04-10-2019, 01:40 AM
macropod's Avatar
macropod macropod is offline Wrap Square and Resize Selected Picture Windows 7 64bit Wrap Square and Resize Selected Picture Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,525
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

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
Alternatively, if you're doing bulk insertions, see: https://www.msofficeforums.com/word-...html#post47919
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
resize pictures, wrap

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing picture wrap text to Square Yonatanx3 Word VBA 2 01-20-2019 03:49 PM
Wrap Square and Resize Selected Picture Wrap Text Inside Picture marconexcel Drawing and Graphics 2 02-02-2018 05:01 PM
Wrap Square and Resize Selected Picture Wrap TABLES around picture? ShankedS Word Tables 2 11-16-2015 04:27 PM
Wrap Square and Resize Selected Picture Word - Resize image to specified selected cells' dimensions FaizanRoshan Word VBA 7 10-18-2015 03:34 PM
Wrap Square and Resize Selected Picture Tiny square but no picture pasted Seafarer Word 3 12-28-2011 05:35 PM


All times are GMT -7. The time now is 09:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft