We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to remove footer line in word document

Thread ID:

Created:

Updated:

Platform:

Replies:

77992 Nov 24,2008 05:55 PM UTC Nov 25,2008 08:53 AM UTC Windows Forms 1
loading
Tags: DocIO
Rambabu Pusala
Asked On November 24, 2008 05:55 PM UTC

Hi All,

Please provide the codes lines for removing the footer line in existing document.

Thanks in advance,
Rambabu




Bhuvaneswari P [Syncfusion]
Replied On November 25, 2008 08:53 AM UTC

Hi Rambabu,

Thank you for your interest in Syncfusion products.

Please use the below code snippet to remove the footer from the existing document.

WordDocument document = new WordDocument(@"..\..\Doc1.doc");
HeaderFooter footer= document.Sections[0].HeadersFooters.Footer;
for (int i = 0; i < footer.ChildEntities.Count; i++)
footer.ChildEntities.RemoveAt(0);
document.Save("sample.doc");
System.Diagnostics.Process.Start("sample.doc");


Please try this code and let us know if this helps you.

Best Regards,
Bhuvana



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;