Word inserting section breaks automatically

H

Haydn

My application performs the following:

1. Get XML from document.
2. Transform it in some way.
3. Clear document.
4. InsertXML(transformed document) - including some tables.
5. Insert header and footer (using
Sections[1].Headers[wdHeaderFooterFirstPage]).

There are several problems here.

1. After step 4. Word has inserted a section break for me - I never asked
for one.
2. When I save the document as an XML document, the header and footer is not
saved.
3. When I save the document as a Word document (DOC), the header and footer
is saved.
4. When I delete the section break, my header is deleted too.

This is infuriating. Why does Word insert section breaks for me when I
don't want them? How do I stop it from doing this? Why does Word not save
my headers and footers in XML format but will in DOC format?

TIA,

Haydn
 
H

Haydn

Wow. How poor is Word. After inserting my XML Word clearly shows a
":::::::::::::Section Break (continuous):::::::::::::::::::::::::"
line.

Now, I do a find and pick special and "Section Break" or ^b. Word does not
find anything in the document. How can this be? It clearly shows that there
is a section break there that it put in!!!?!?!?!?!?!?!?
 

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