Hi Friends,
I want to read .docx file using C# & Add something in it's header Part.Please give any suggestion?
Thabks in advance.
Reading File
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Saber ShaikhRank #1,687 · 905 reputationPosted Feb 1, 2015, 8:46 PM EST
http://www.dotnetspider.com/forum/305037-How-Read-Doc-Docx-file-Asp-net-c.aspx
Blog: http://aspnettutorialscode.blogspot.in/
Jacke Elis36 reputationPosted Feb 2, 2015, 12:11 AM EST
Here is an example:
// Load DOCX file. var document = DocumentModel.Load("Sample.docx"); // Get first section's default header. var defaultHeader = document.Sections[0].HeadersFooters[HeaderFooterType.HeaderDefault]; // Add some content to default header. defaultHeader.Blocks.Add( new Paragraph(document, "Hello World"));Munesh SharmaRank #174 · 13.9K reputationPosted Feb 2, 2015, 12:47 AM EST