Thank you so much. This is fantastic and I shall try to learn from this by studying and trying to understand what you've written.
Most of my limited macro coding has been done by recording keystrokesand then tweaking. I guess this makes for inefficient code.
I've tried to run the code, but get a compile error. This was in this section near the end:
For Each Fld In .Fields
If Fld.Type = wdFieldTOCEntry Then
Fld.Paragraphs(1).Range.Text = vbNullString
End If
Next
The word 'Paragraphs' was highlighted with a 'Method or data member not found' message.
Thanks again,
Jeremy
|