View Single Post
 
Old 09-29-2025, 03:23 AM
MJH001 MJH001 is offline Windows 11 Office 2019
Novice
 
Join Date: Sep 2025
Posts: 6
MJH001 is on a distinguished road
Default

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
Reply With Quote