Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-01-2023, 07:16 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Need Help with my script, Convert 1 Group TextBox from Inline with text toWrap Square then Ungroup Windows 10 Need Help with my script, Convert 1 Group TextBox from Inline with text toWrap Square then Ungroup Office 2019
Competent Performer
Need Help with my script, Convert 1 Group TextBox from Inline with text toWrap Square then Ungroup
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Question Need Help with my script, Convert 1 Group TextBox from Inline with text toWrap Square then Ungroup

Hello Pros,


I was sure I did a good job, but if my document has more group of textbox, it ignores the Selected textbox group and goes to the next BUT if I have the same TextBox Group, copied a few time in an empty document, it takes it????

HTML Code:
Sub Graph_CONVERT_1_TxtBox_to_WrapSquare_and_Ungroup()
'based on ungroup = web link https://stackoverflow.com/questions/51141788/word-macro-to-ungroup-text-boxes

'created by me, which playing, with the scripts 2023-06-01 

Dim xNmbr As Integer
With ActiveDocument
   'For xNmbr = .Shapes.Count To 1 Step -1 (changed this from all to set (1)
       'Set thisshape = .Shapes(xNmbr)
        Set thisshape = .Shapes(1)
         .Shapes(1).Select
        
        With thisshape.WrapFormat
       .Type = wdWrapSquare
         If thisshape.Type = msoGroup Then thisshape.Ungroup
        End With
   ' Next

End With
        On Error GoTo 0
Set xNbre = Nothing

End Sub
What am I doing wrong? Been trying to find the logic, and I can't figure it out.

Any insights would be really appreciated

C
Reply With Quote
 

Tags
help please, shapes, wrapping around image



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with my script, Convert 1 Group TextBox from Inline with text toWrap Square then Ungroup VBA Script that can convert XML Files to Word Doc. Rolo18 Word VBA 11 03-31-2020 02:16 PM
Need Help with my script, Convert 1 Group TextBox from Inline with text toWrap Square then Ungroup The "group or ungroup text range" control in the developer tab breaks my document up into many pages damiansiniakowicz Word 8 05-10-2018 12:30 PM
Need Help with my script, Convert 1 Group TextBox from Inline with text toWrap Square then Ungroup Setting a Group as Inline mohsen.amiri Word 2 11-10-2017 03:16 AM
Canvas + textbox + group = weird ghost bug? somads Word 0 11-25-2015 01:37 AM
Group records - multiple IF stmts - Text After Group baum12 Mail Merge 1 05-25-2015 12:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:46 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