facebooktwittermenuarrow-up

GemBox Support Forum

How we can delete paragraph from word document

I want t delete paragraph from word document and also remove the paragraph space.

Hi Sonu,

User this:

paragraph.Content.Delete();

Or this:

paragraph.ParentCollection.Remove(paragraph);

Regards,
Mario

But Space is not removed.
Suppose : we have three paragraph.
paragraph1
paragraph2
paragraph3

and i remove second paragraph2 then output is coming like that
paragraph1

paragraph3

but I want output like
paragraph1
paragraph3

Hi,

I was unable to reproduce this.

Please send us a small Visual Studio project that reproduces your issue so that we can investigate it.

Regards,
Mario

Now I fixed the issue with your suggestion. Thanks for your help!.