Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2021, 07:17 AM
Kevin Rush Kevin Rush is offline Help Improving Macro Windows 10 Help Improving Macro Office 2019
Novice
Help Improving Macro
 
Join Date: Oct 2021
Posts: 2
Kevin Rush is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 10-03-2021, 03:09 PM
Guessed's Avatar
Guessed Guessed is offline Help Improving Macro Windows 10 Help Improving Macro Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 10-06-2021, 03:44 PM
Kevin Rush Kevin Rush is offline Help Improving Macro Windows 10 Help Improving Macro Office 2019
Novice
Help Improving Macro
 
Join Date: Oct 2021
Posts: 2
Kevin Rush is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
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

Thanks for that. Sorted my problem
Reply With Quote
Reply



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
Help Improving Macro Suggestions wanted for improving workflow of shared incoming emails plaidma1 Outlook 1 05-03-2013 09:33 AM
Help Improving Macro Improving saving in Word solaster Word 2 07-13-2012 03:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:16 AM.


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