![]() |
#4
|
||||
|
||||
![]()
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
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 |
![]() |
GuitarForLife | Word VBA | 7 | 02-09-2018 01:59 PM |
![]() |
donaldadams1951 | Word VBA | 4 | 02-04-2015 03:54 PM |
![]() |
bcarlier | Word Tables | 17 | 05-10-2014 02:36 PM |