Check which footnote numbering setting is active for footnotes

A

andreas

Dear Experts:
I would like to have a macro that performs the following task on a
multi-section document:

Check whether the footnote numbering has been set as
(1) ... restart footnote numbering on each section
(2)... continuous footnote numbering or
(3) ... a mix of the two settings above

The results are to be displayed in a msgbox, such as
all sections have setting (1) or (2) or there is a mix of the two
first settings (of course the latter one should never happen)
Help is much appreciated. Thank you very much in advance.

Regards, Andreas
 
D

Doug Robbins - Word MVP

Dim i As Long
Dim RestartSection As Boolean
Dim Continuous As Boolean
RestartSection = False
Continuous = False
With ActiveDocument
For i = 1 To .Sections.Count
If .Sections(i).Range.FootnoteOptions.NumberingRule =
wdRestartContinuous Then
Continuous = True
ElseIf .Sections(i).Range.FootnoteOptions.NumberingRule =
wdRestartSection Then
RestartSection = True
End If
Next i
End With
If Continuous = True And RestartSection = False Then
MsgBox "All Sections have continuous footnote numbering."
ElseIf RestartSection = True And Continuous = False Then
MsgBox "The footnote numbering restarts at each Section."
Else
MsgBox "There is a mix of footnote numbering in the document."
End If


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
A

andreas

Dim i As Long
Dim RestartSection As Boolean
Dim Continuous As Boolean
RestartSection = False
Continuous = False
With ActiveDocument
    For i = 1 To .Sections.Count
        If .Sections(i).Range.FootnoteOptions.NumberingRule =
wdRestartContinuous Then
            Continuous = True
        ElseIf .Sections(i).Range.FootnoteOptions.NumberingRule =
wdRestartSection Then
            RestartSection = True
        End If
    Next i
End With
If Continuous = True And RestartSection = False Then
    MsgBox "All Sections have continuous footnote numbering."
ElseIf RestartSection = True And Continuous = False Then
    MsgBox "The footnote numbering restarts at each Section."
Else
    MsgBox "There is a mix of footnote numbering in the document."
End If

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.









- Zitierten Text anzeigen -

Hi Doug,

thank you very much for your terrific help. Exactly what I wanted.
Thank you very much. Regards, Andreas
 

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