MsgBox
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Characters.Count
MsgBox
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Characters.Count
It includes spaces and carriage returns.

Signature
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
> Can anybody give me the macro code to find the character count of the
> contents in header/footer?
>
> Thanks!
>
> Paresh
Paresh - 29 Aug 2005 07:58 GMT
Thanks for the tip.
Regards,
Paresh
> MsgBox
> ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Characters.Count
[quoted text clipped - 9 lines]
> >
> > Paresh
Greg - 29 Aug 2005 13:28 GMT
You could omit the count of spaces, line breaks and paragraph returns
with something like:
Sub CountCharacters()
Dim oChr As Range
Dim i As Long
For Each oChr In
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Characters
Select Case Asc(oChr)
Case Is = 11, 13, 32 'The Asc Code for a paragraph, line break, and
space
i = i
Case Else
i = i + 1
End Select
Next
MsgBox "The header contains " & i & " characters."
End Sub