Word unexpected header&footer insertion

A

Alexander

Hello All,

we are processing Word documents using Word Automation inside our application.

Unfortunately it inserts also header/footer for some reason.

The simpliest way to reproduce it is -

1. Open new Word document.
2. Set top margin 0
3. Input some text on top
4. run VBA script

Sub Macro9()
MsgBox (ActiveDocument.Sections(1).Footers(1).Range.Text)
End Sub

5. See that your text is shifted down by appeared header.

6. Now if save document this unexpected header will be preserved.

Can anyone help on this ?
 

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