Mystery Paragraph Mark in Header

J

JeffP->

All,

Simply accessing a header in Sections.Headers inserts a paragraph mark.

How to duplicate the Mystery Paragraph Mark in Header…

1. Create a new doc
2. Type Hello… on the first line
3. Adjust the Top Margin = .5†to appreciate the bug more, reduce this
4. Type the following in a new module (macro) called Hello()

Sub Hello()
Dim oS As Section
Dim oH As HeaderFooter
For Each oS In ActiveDocument.Sections
For Each oH In oS.Headers
If oH.Range.Fields.Count > 1 Then
End If
Next oH
Next oS
End Sub

5. Close the editor, save the hello.doc somewhere.
6. Click the Show/Hide so you can see paragraph marks, it works either way,
it’s just prettyful this way.
7. Run the macro, |Developer, |Macros, |Hello, click |Run

Viola’ you have a 12pt Times New Roman paragraph ¶ mark.
Viewing the header footer magically makes it disappear as well as changing
view to print preview & back.

Any suggestions would be appreciated.
 

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