Unlinking headers cause formatting issues of sections without headers

I am basically tryinmg to merge documents without loosing the format of the source documents. The problem is that if one of the documents doesn't have a header and I unlink it from previous, it creates a header with a carriage return in it. This extra carriage return causes text to be placed on another page.

I'm not sure there is an easy way out of this. You need to have at least one empty paragraph in a header or footer in the document for MS Word to treat that header/footer as not linked to previous. Basically, there is no separate "flag" in MS Word to control that - either you have text in the header and it is not linked or you don't and it is linked.

You can try setting the font of the paragraph mark to some small size, say 1 or 2 pt. Paragraph.Font.Size = 2;

You can also experiment with PageSetup.HeaderDistance and PageSetup.FooterDistance and of course with PageSetup.TopMargin and BottomMargin - make them smaller.

Thanks for the quick response. It seems like a hackSmile [:)] but I will give these a shot.