Event change of table in Word
问题 Private Sub Document_Change(ByVal Target As Range) Set table = ActiveDocument.Tables(1) If Not Intersect(table, Target) Is Nothing Then Target.AutoFormat ApplyColor: Red End If End Sub I have the following code, but it does not seem to work in VBA Word. Can anyone help me out? 回答1: I suppose that you copied the code from Excel VBA and tried to rebuild it a bit. There are a few differences between Excel and Word VBA. Intersect does not exist in Word VBA. DocumentChange event in Word works