Thread: [Solved] Object required (Error 424)
View Single Post
 
Old 04-13-2022, 02:18 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 Object required (Error 424)

Trying to write a sub to reset all content controls to its original status, I met the error 424 on the code : ct1.Range.Text = ""

Could you please help me out, many thanks.

the complete code as below:

Sub ResetCC()
Dim ctl As ContentControl
Dim String1 As String
For Each ctl In ActiveDocument.ContentControls
If ctl.Type = wdContentControlRichText Then

ct1.Range.Text = ""

End If
Next
End Sub
Reply With Quote