1
Answer

Please convert and give me the below code to c#

Its in VBA
 
If cmbhlevels.Value = "1" Then
ActiveDocument.AttachedTemplate.AutoTextEntries("z_TOC1").Insert Where _
:=Selection.Range, RichText:=True
End If
If cmbhlevels.Value = "2" Then
ActiveDocument.AttachedTemplate.AutoTextEntries("z_TOC2").Insert Where _
:=Selection.Range, RichText:=True
End If
 
Answers (1)