Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-16-2021, 01:19 AM
gmayor's Avatar
gmayor gmayor is offline Move table using VBA Windows 10 Move table using VBA Office 2019
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

Without access to the document, I think the following should work:
Code:
Sub Macro1()
'Graham Mayor - https://www.gmayor.com - Last updated - 16 Dec 2021
Dim oTable As Table
Dim oRng As Range
Dim oCtrl As InlineShape
Dim oCheck As Object

    Set oTable = ActiveDocument.Tables(ActiveDocument.Tables.Count)
    Set oRng = ActiveDocument.Range(0, 0)
    oRng.FormattedText = oTable.Range.FormattedText
    oRng.Select
     oTable.Delete


    ActiveWindow.View.ShowHiddenText = False

    For Each oCtrl In ActiveDocument.InlineShapes
        If oCtrl.OLEFormat.ProgID = "Forms.CheckBox.1" Then
            Set oCheck = oCtrl.OLEFormat.Object
            If oCheck.value = False Then
                oCheck.Select
                Selection.Font.Hidden = True
            End If
        End If
    Next oCtrl
lbl_Exit:
    Set oTable = Nothing
    Set oRng = Nothing
    Set oCtrl = Nothing
    Set oCheck = Nothing
    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
Move table using VBA Move entire rows from one table to another table Marcia Excel Programming 4 11-16-2021 05:24 PM
Change default move row behavior to "shift-move" JoshM Excel 2 10-05-2018 05:06 AM
Move table using VBA Move Selection to the next Column on a Page (Not a table) GuitarForLife Word VBA 7 02-09-2018 01:59 PM
Move table using VBA Move table cell contents from one table to another table or cell in same table donaldadams1951 Word VBA 4 02-04-2015 03:54 PM
Move table using VBA Move existing table captions bcarlier Word Tables 17 05-10-2014 02:36 PM

Other Forums: Access Forums

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