Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-15-2017, 09:50 PM
gmayor's Avatar
gmayor gmayor is offline wrapping text using Word VBA Windows 10 wrapping text using Word VBA Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The default wrap option is in-line thus an in-line shape. To float the image you need to convert it to a shape and then set the wrap of the shape - so assuming that is the case there e.g.:

Code:
Sub Macro1()
'Graham Mayor - http://www.gmayor.com - Last updated - 16/04/2017 
Dim oShape As Shape
    Set oShape = Selection.InlineShapes.Item(1).ConvertToShape
    With oShape.WrapFormat
        .Type = wdWrapTight
        .Side = wdWrapBoth
        .DistanceTop = InchesToPoints(0.1)
        .DistanceBottom = InchesToPoints(0.1)
        .DistanceLeft = InchesToPoints(0.1)
        .DistanceRight = InchesToPoints(0.1)
    End With
lbl_Exit:
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
text not wrapping in Word table on Mac only tamarix Word Tables 0 02-26-2017 12:53 PM
wrapping text using Word VBA Word formatting/wrapping text Dracven Word 1 09-19-2016 04:52 AM
wrapping text using Word VBA Word inserting line breaks / wrapping text Girloutside Word 1 08-10-2015 12:45 PM
wrapping text using Word VBA PNG logo in Word- text wrapping and diminishing image quality. sscad27 Word 1 07-08-2014 03:16 AM
word wrapping in a text box (need help asap) 4x4Jeep Word 1 06-21-2012 06:07 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:51 AM.


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