View Single Post
 
Old 04-13-2022, 07:17 AM
ericliu24 ericliu24 is offline Windows 10 Office 2019
Novice
 
Join Date: Mar 2022
Location: China
Posts: 21
ericliu24 is on a distinguished road
Default How to reset building block gallery content control

For autotext or dropdownlist, we could set .range.text ="" to reset them.

But for building block gallery content control (category is table), how to do it?

Many thanks.

Sub ResetCC()
Dim ct1 As ContentControl
Dim String1 As String
For Each ct1 In ActiveDocument.ContentControls
If ct1.Type=wdContentControlDropdownList Then
ct1.Type = wdContentControlText
ct1.Range.Text = ""
ct1.Type = wdContentControlDropdownList

End If

If ct1.Type=wdContentControlBuildingBlockGallery Then
' how to reset?
End If

Next
End Sub
Reply With Quote