Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Document-Processing-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -4852,7 +4852,7 @@
<a href="/document-processing/word/word-library/net/Conversion">Working with Document Conversion</a>
<ul>
<li>
<a href="/document-processing/word/word-library/net/word-file-formats">Word File Formats</a>
<a href="/document-processing/word/word-library/net/word-file-formats">Word File Formats Conversions</a>
</li>
<li>
<a href="/document-processing/word/conversions/word-to-pdf/overview">Word to PDF</a>
Expand Down
32 changes: 16 additions & 16 deletions Document-Processing/Word/Word-Library/NET/Support-File-Formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ documentation: UG

# Supported File Formats in .NET Word Library

Syncfusion<sup>&reg;</sup> .NET Word Library (DocIO) supports all major native file formats of Microsoft Word, such as DOC, DOCX, RTF, DOT, DOTX, DOCM, and more. It also supports conversion for major native file formats to HTML, Markdown, PDF and image.
Syncfusion<sup>&reg;</sup> .NET Word Library (DocIO) supports all major native file formats of Microsoft Word, such as {{'[DOC](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-binary-97-2003-format)'| markdownify }}, {{'[DOCX](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-document-docx)'| markdownify }}, {{'[RTF](https://help.syncfusion.com/document-processing/word/word-library/net/rtf)'| markdownify }}, {{'[DOT](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-97-2003-template-dot)'| markdownify }}, {{'[DOTX](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-template-dotx)'| markdownify }}, {{'[DOCM](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#macros-docm-dotm)'| markdownify }}, and more. It also supports conversion for major native file formats to {{'[HTML](https://help.syncfusion.com/document-processing/word/word-library/net/html)'| markdownify }}, {{'[Markdown](https://help.syncfusion.com/document-processing/word/word-library/net/convert-word-document-to-markdown-in-csharp)'| markdownify }}, {{'[PDF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf)'| markdownify }} and {{'[image](https://help.syncfusion.com/document-processing/word/conversions/word-to-image/net/word-to-image)'| markdownify }}.

The following table describes the supported file formats and their conversions in DocIO.

Expand All @@ -19,25 +19,25 @@ The following table describes the supported file formats and their conversions i
</tr>
<tr>
<th>
DOC
{{'[DOC](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-binary-97-2003-format)'| markdownify }}
</th>
<th>
{{'[DOCX](https://help.syncfusion.com/document-processing/word/word-library/net/open-and-save-word-document-in-console-application#open-and-save-word-document-using-net-core-and-latest)'| markdownify }}
{{'[DOCX](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-document-docx)'| markdownify }}
</th>
<th>
Word Processing XML (2007)
{{'[Word Processing XML (2007)](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-processing-xml-xml)'| markdownify }}
</th>
<th>
DOT
{{'[DOT](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-97-2003-template-dot)'| markdownify }}
</th>
<th>
DOTX
{{'[DOTX](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-template-dotx)'| markdownify }}
</th>
<th>
DOCM
{{'[DOCM](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#macros-docm-dotm)'| markdownify }}
</th>
<th>
DOTM
{{'[DOTM](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#macros-docm-dotm)'| markdownify }}
</th>
<th>
{{'[ODT](https://help.syncfusion.com/document-processing/word/word-library/net/word-to-odt)'| markdownify }}
Expand All @@ -62,7 +62,7 @@ DOTM
</th>
</tr>
<tr>
<th>DOC</th>
<th>{{'[DOC](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-binary-97-2003-format)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand All @@ -79,7 +79,7 @@ DOTM
<td>Yes</td>
</tr>
<tr>
<th>{{'[DOCX](https://help.syncfusion.com/document-processing/word/word-library/net/open-and-save-word-document-in-console-application#open-and-save-word-document-using-net-core-and-latest)'| markdownify }}</th>
<th>{{'[DOCX](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-document-docx)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand All @@ -96,7 +96,7 @@ DOTM
<td>Yes</td>
</tr>
<tr>
<th>Word Processing XML (2003)</th>
<th>{{'[Word Processing XML (2003)](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-processing-xml-xml)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand All @@ -113,7 +113,7 @@ DOTM
<td>Yes</td>
</tr>
<tr>
<th>Word Processing XML (2007)</th>
<th>{{'[Word Processing XML (2007)](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-processing-xml-xml)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand All @@ -130,7 +130,7 @@ DOTM
<td>Yes</td>
</tr>
<tr>
<th>DOT</th>
<th>{{'[DOT](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-97-2003-template-dot)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand All @@ -147,7 +147,7 @@ DOTM
<td>Yes</td>
</tr>
<tr>
<th>DOTX</th>
<th>{{'[DOTX](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#word-template-dotx)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand All @@ -164,7 +164,7 @@ DOTM
<td>Yes</td>
</tr>
<tr>
<th>DOCM</th>
<th>{{'[DOCM](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#macros-docm-dotm)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand All @@ -181,7 +181,7 @@ DOTM
<td>Yes</td>
</tr>
<tr>
<th>DOTM</th>
<th>{{'[DOTM](https://help.syncfusion.com/document-processing/word/word-library/net/word-file-formats#macros-docm-dotm)'| markdownify }}</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform: document-processing
control: DocIO
documentation: UG
---
# Working with OLE Objects
# Working with OLE Objects in Word Library

OLE (Object Linking and Embedding) objects allow embedding and linking to documents and other objects. It allows the content of one program to be used in a Word document. The Objects can be inserted in the following two ways:

Expand Down Expand Up @@ -480,6 +480,64 @@ End Sub

You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Remove-ole-object).

### Preserve embedded Ole image as normal image

Essential<sup>&reg;</sup> DocIO keeps the entire document contents (paragraphs, images, tables and all other supported items along with the formatting) in main memory. So, there is a chance for "Out of memory exception" when the memory utilization exceeds the maximum level. For further information, please refer [here](https://support.syncfusion.com/kb/article/3998/why-does-out-of-memory-exception-arise-on-processing-large-size-documents-in-essential).

You can reduce the memory usage in DocIO DOM when the Word document has embedded Ole image of large file size. You can preserve these embedded Ole images as normal images by setting [PreserveOleImageAsImage](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Settings.html#Syncfusion_DocIO_DLS_Settings_PreserveOleImageAsImage) property of Settings class as true, before opening the Word document.

If [PreserveOleImageAsImage](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Settings.html#Syncfusion_DocIO_DLS_Settings_PreserveOleImageAsImage) flag is enabled, DocIO internally skips to read the embedded Ole image of large file size (.bin), instead DocIO reuses the Ole image from Word document as normal image for the same visual appearance. This will reduce the memory usage in DocIO DOM and resolves “Out of memory exception” at some cases.

The following code example shows how to preserve embedded Ole image as normal image in a Word document.

{% tabs %}

{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Paragraphs/Ole-image-as-normal-image/.NET/Ole-image-as-normal-image/Program.cs" %}
//Creates a new instance of WordDocument (Empty Word Document)
using (WordDocument document = new WordDocument())
{
//Loads or opens an existing Word document from stream
FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
// Sets flag to preserve embedded Ole image as normal image while opening document
document.Settings.PreserveOleImageAsImage = true;
//Loads or opens an existing Word document through Open method of WordDocument class
document.Open(fileStreamPath, FormatType.Automatic);
//Saves the Word document to MemoryStream.
MemoryStream stream = new MemoryStream();
document.Save(stream, FormatType.Docx);
//Closes the Word document.
document.Close();
}
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
//Creates an empty Word document instance
WordDocument document = new WordDocument();
//Sets flag to preserve embedded Ole image as normal image while opening document
document.Settings.PreserveOleImageAsImage = true;
//Loads or opens an existing Word document
document.Open("Template.docx");
//Saves and closes the Word document
document.Save("Sample.docx", FormatType.Docx);
document.Close();
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
'Creates an empty Word document instance
Dim document As New WordDocument()
'Sets flag to preserve embedded Ole image as normal image while opening document
document.Settings.PreserveOleImageAsImage = True
'Loads or opens an existing Word document
document.Open("Template.docx")
'Saves and closes the Word Document
document.Save("Sample.docx", FormatType.Docx)
document.Close()
{% endhighlight %}

{% endtabs %}

You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Paragraphs/Ole-image-as-normal-image).

## Online Demo

* Explore how to insert an OLE Object into the Word document using the .NET Word Library (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/insertoleobject#/tailwind).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ using (FileStream fileStream = new FileStream("Template.dotm", FileMode.Open, Fi
{
//Saves the Word document to stream.
document.Save(stream, FormatType.Word2013Docm);
}
}
}
}
Expand Down
Loading