I have an application that generates a Word document. Among other things I need to repeat a three paragraphs on every page - so I use a header and it generates normally. I have two problems however:
1. A header is by default displayed using grey font - can I change it? I'd like the paragraph to be diplayed in the same color as the rest of the document (black).
2. I need to alternate styles between the three paragraphs, as follows: 1st paragraph - aligned to the left 2nd paragraph - aligned to the centre 3rd paragraph - aligned to the left, different font size.
I was unable to find answers to these two problems. I'd appretiate if anyone could help me in any way.
My code is as follows. Unfortunatly, my aligning attempts align the whole header, rather than only the paragraph.
Don't set the style on the text directly. It is commonly misused feature of Word, and they should not allow such a waste of formatting. Always use styles, and only in rare cases, modify the formatting of a piece of text manually.