Hello community,
I have HTML-Code like this:
<p>Paragraph first</p>
<ul>
<li>Test 1</li>
<li>Test 2</li>
</ul>
<p>Paragraph between</p>
<p>Paragraph last</p>
I would like to insert this HTML code into a Word document. For this I use the following code:
IWParagraph Paragraph1 = section.AddParagraph();
Paragraph1.ParagraphFormat.BeforeSpacing = 0;
Paragraph1.ParagraphFormat.AfterSpacing = 0;
Paragraph1.ParagraphFormat.SpaceAfterAuto = false;
Paragraph1.ParagraphFormat.SpaceBeforeAuto = false;
Paragraph1.AppendHTML("HTML-Code...");
Unfortunately, the formatting BeforeSpacing and SpaceBeforeAuto are applied only to the first paragraph <p> and AfterSpacing and SpaceAfterAuto are applied only to the last paragraph <p>. For the paragraphs in between, my specifications are ignored and set to "auto". The spacing is so much too big. How can I control this?
I've been trying to solve this problem for hours.
Does anyone have a solution?
With best regards
Robert