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($"WordGroupShapes.docx"); | |
// Initialize the body with the loaded document. | |
var body = new FileFormat.Words.Body(doc); | |
// Load all group shapes | |
var groupShapes = body.GroupShapes; |
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($"WordGroupShapes.docx"); | |
// Initialize the body with the loaded document. | |
var body = new FileFormat.Words.Body(doc); | |
// Load all group shapes with the document | |
var groupShapes = body.GroupShapes; |
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 a new word document with the default template | |
var doc = new FileFormat.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize the body with the new document | |
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($"shapes.docx"); | |
// Initialize the body with the loaded document. | |
var body = new FileFormat.Words.Body(doc); | |
// Load all shapes | |
var shapes = body.Shapes; |
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($"shapes.docx"); | |
// Initialize the body with the loaded document. | |
var body = new FileFormat.Words.Body(doc); | |
// Load all shapes with the document | |
var shapes = body.Shapes; |
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 a new word document with the default template | |
var doc = new FileFormat.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize the body with the new document | |
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($"WordParagraphsFrame.docx"); | |
var body = new FileFormat.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/FileFormat.Words">FileFormat.Words</a>. | |
// Load the Word Document | |
var doc = new FileFormat.Words.Document($"WordParagraphsFrame.docx"); | |
var body = new FileFormat.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/FileFormat.Words">FileFormat.Words</a>. | |
// Initialize a new word document with the default template | |
var doc = new FileFormat.Words.Document(); | |
System.Console.WriteLine("Word Document with default template initialized"); | |
// Initialize the body with the new document | |
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($"MultilevelLists.docx"); | |
// Initialize the body with the document | |
var body = new FileFormat.Words.Body(doc); | |
foreach (var paragraph in body.Paragraphs) | |
{ |
NewerOlder