Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 03-25-2018, 04:26 AM
Bluebell Bluebell is offline Wrap text code not working Windows 8 Wrap text code not working Office 2010 64bit
Novice
Wrap text code not working
 
Join Date: Jan 2014
Posts: 10
Bluebell is on a distinguished road
Default All working

Thank you very much, this is my final code which covers both shapes and inline shapes
You are a star

HTML Code:
Sub AllShapes()
'add a blue thin border and locks aspect ratio
'if the image is already a shape uses this macro

Dim oSh As Shape
Dim Osl As InlineShape
For Each oSh In ActiveDocument.Shapes
            oSh.LockAspectRatio = True
            oSh.Line.Weight = 2
            oSh.Line.Style = msoLineSingle
            oSh.Line.ForeColor.RGB = RGB(91, 155, 213)
            oSh.WrapFormat.Type = wdWrapTopBottom
            Next
'formats the shapes and if an inline shapes converts to shapes and aligns top and bottom
 For Each Osl In ActiveDocument.InlineShapes
            Osl.LockAspectRatio = True
            Osl.Line.Weight = 2
            Osl.Line.Style = msoLineSingle
           Osl.Line.ForeColor.RGB = RGB(91, 155, 213)
          Set oSh = Osl.ConvertToShape
      oSh.WrapFormat.Type = wdWrapTopBottom

      Next
      
 
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrap text code not working Wrap text in text box around image with transparent background pstidsen Word 4 02-08-2016 03:30 PM
Wrap text code not working How to Wrap Text on Images in Text Boxes mrniceguy Word 1 02-16-2014 04:42 PM
Wrap text code not working Text wrap chuckmg@acm.org Word 6 10-01-2013 07:39 PM
Wrap text code not working Wrap Text function not working? mhays Excel 1 11-21-2012 05:03 PM
Text Won't Wrap WRowan Publisher 0 06-14-2012 09:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:28 PM.


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