#1
|
|||
|
|||
Help Improving Macro
Hi, I have a macro that will change a selected image in size, this works perfectly. I would also like the image to format as Wrapped behind text. I have a tried a few options and they won’t work and come up as an error. Could someone help with this, much appreciated.
Sub SizeDrawingLandscape() ' ResizeImage Macro ' Selected image(s) are resized to A4 Dim shape As InlineShape ' iterate all selected shapes For Each shape In Selection.InlineShapes ' remain aspect ratio shape.LockAspectRatio = msoTrue ' set size to A4 shape.Width = CentimetersToPoints(29.7) shape.Height = CentimetersToPoints(21) Next End Sub |
#2
|
||||
|
||||
Inline shapes won't allow text wrapping so you would need to convert them to shapes to allow the wrapping to occur.
This old post by Greg Maxey shows you the relevant code https://www.msofficeforums.com/156186-post2.html
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Quote:
Thanks for that. Sorted my problem |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calling macro from loop-all-files macro only opens one file | Peterson | Word VBA | 0 | 03-27-2021 07:58 PM |
Calculate gain from improving worst performing decile to median level | Hoss | Excel | 6 | 02-11-2019 06:34 AM |
Spell check macro within macro button field doesn't work in one document | samuelle | Word VBA | 0 | 07-20-2016 02:27 AM |
Suggestions wanted for improving workflow of shared incoming emails | plaidma1 | Outlook | 1 | 05-03-2013 09:33 AM |
Improving saving in Word | solaster | Word | 2 | 07-13-2012 03:09 PM |