How to delete tc fields

S

Sue Klefstad

The field_object.unlink method does not do anything to tc fields (table of
contents entry fields). How can I remove tc fields?

Thank you.

-- Sue
 
G

Greg Maxey

Do you mean remove as in "delete?"

Sub Test()
Dim oFld As Field
For Each oFld In ActiveDocument.Range.Fields
If oFld.Type = wdFieldTOCEntry Then
oFld.Delete
End If
Next
End Sub
 
S

Sue Klefstad

Greg,
Yes, I meant remove as in delete. This is just what I was hoping for.

Thank you!

-- Sue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top