This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"MultilevelLists.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
foreach (var paragraph in body.Paragraphs) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"MultilevelLists.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
//System.Collections.Generic.List<FileFormat.Words.IElements.Paragraph> | |
// paragraphs = body.Paragraphs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// The resulting docx document should be like this: https://i.imgur.com/6PKIb56.png | |
// Initialize docx document | |
FileFormat.Words.Document doc = new FileFormat.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize document body | |
var body = new FileFormat.Words.Body(doc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"WordParagraphsRomanAlphabetic.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
//foreach (FileFormat.Words.IElements.Paragraph paragraph in body.Paragraphs) | |
foreach (var paragraph in body.Paragraphs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"WordParagraphsRomanAlphabetic.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
//System.Collections.Generic.List<FileFormat.Words.IElements.Paragraph> | |
// paragraphs = body.Paragraphs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Initialize docx document | |
FileFormat.Words.Document doc = new FileFormat.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize document body | |
var body = new FileFormat.Words.Body(doc); | |
System.Console.WriteLine("Body of the Word Document initialized"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"WordParagraphsNumbered.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
//foreach (FileFormat.Words.IElements.Paragraph paragraph in body.Paragraphs) | |
foreach (var paragraph in body.Paragraphs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"WordParagraphsNumbered.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
//System.Collections.Generic.List<FileFormat.Words.IElements.Paragraph> | |
// paragraphs = body.Paragraphs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Initialize docx document | |
FileFormat.Words.Document doc = new FileFormat.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize document body | |
var body = new FileFormat.Words.Body(doc); | |
System.Console.WriteLine("Body of the Word Document initialized"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prerequisite: Install <a href="https://www.nuget.org/packages/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"filename.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
foreach (FileFormat.Words.IElements.Paragraph paragraph in body.Paragraphs) | |
{ |
NewerOlder