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/Openize.Words">Openize.Words</a>. | |
// Load the Word Document | |
var doc = new Openize.Words.Document($"WordParagraphsFrame.docx"); | |
var body = new Openize.Words.Body(doc); | |
foreach (var paragraph in body.Paragraphs) | |
{ | |
if (paragraph.ParagraphBorder.Size > 0) | |
{ |
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/Openize.Words">Openize.Words</a>. | |
// Load the Word Document | |
var doc = new Openize.Words.Document($"WordParagraphsFrame.docx"); | |
var body = new Openize.Words.Body(doc); | |
// Traverse and display paragraphs with plain text | |
foreach (var paragraph in body.Paragraphs) | |
{ | |
System.Console.WriteLine($" Paragraph Text: {paragraph.Text}"); |
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/Openize.Words">Openize.Words</a>. | |
// Initialize a new word document with the default template | |
var doc = new Openize.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize the body with the new document | |
var body = new Openize.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/Openize.Words">Openize.Words</a>. | |
// Load the Word Document | |
var doc = new Openize.Words.Document($"MultilevelLists.docx"); | |
// Initialize the body with the document | |
var body = new Openize.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/Openize.Words">Openize.Words</a>. | |
// Load the Word Document | |
var doc = new Openize.Words.Document($"MultilevelLists.docx"); | |
// Initialize the body with the document | |
var body = new Openize.Words.Body(doc); | |
var 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/Openize.Words">Openize.Words</a>. | |
// The resulting docx document should be like this: https://i.imgur.com/6PKIb56.png | |
// Initialize docx document | |
var doc = new Openize.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize document body | |
var body = new Openize.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/Openize.Words">Openize.Words</a>. | |
// Load the Word Document | |
var doc = new Openize.Words.Document($"WordParagraphsRomanAlphabetic.docx"); | |
// Initialize the body with the document | |
var body = new Openize.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/Openize.Words">Openize.Words</a>. | |
// Load the Word Document | |
var doc = new Openize.Words.Document($"WordParagraphsRomanAlphabetic.docx"); | |
// Initialize the body with the document | |
var body = new Openize.Words.Body(doc); | |
var 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/Openize.Words">Openize.Words</a>. | |
// Initialize docx document | |
var doc = new Openize.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize document body | |
var body = new Openize.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/Openize.Words">Openize.Words</a>. | |
// Load the Word Document | |
var doc = new Openize.Words.Document($"WordParagraphsNumbered.docx"); | |
// Initialize the body with the document | |
var body = new Openize.Words.Body(doc); | |
//foreach (Openize.Words.IElements.Paragraph paragraph in body.Paragraphs) | |
foreach (var paragraph in body.Paragraphs) |
NewerOlder