Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordOpenDocumentConversionExtensions

OfficeIMO.Word.OpenDocument

Namespace
OfficeIMO.Word.OpenDocument
Assembly
OfficeIMO.Word.OpenDocument
Source revision
ba882f6b0d07 with working tree changes
Modifiers
static

Explicit conversions between OfficeIMO Word and native OpenDocument text models.

Inheritance

  • object
  • WordOpenDocumentConversionExtensions

Methods

SaveAsOpenDocument 2 overloads
public static OfficeConversionReport SaveAsOpenDocument(WordDocument source, string path, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Writes the converted output to a path and returns the conversion report.

Parameters

source OfficeIMO.Word.WordDocument required
path string required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionReport
public static OfficeConversionReport SaveAsOpenDocument(WordDocument source, Stream stream, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Writes the converted output to a caller-owned stream, which stays open and returns the conversion report.

Parameters

source OfficeIMO.Word.WordDocument required
stream System.IO.Stream required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionReport
SaveAsOpenDocumentAsync 2 overloads
public static async Task<OfficeConversionReport> SaveAsOpenDocumentAsync(WordDocument source, string path, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously writes the converted output to a path and returns the conversion report.

Parameters

source OfficeIMO.Word.WordDocument required
path string required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionReport>
public static async Task<OfficeConversionReport> SaveAsOpenDocumentAsync(WordDocument source, Stream stream, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously writes the converted output to a caller-owned stream and returns the conversion report.

Parameters

source OfficeIMO.Word.WordDocument required
stream System.IO.Stream required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionReport>
SaveAsWord 2 overloads
public static OfficeConversionReport SaveAsWord(OdtDocument source, string path, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Writes the converted output to a path and returns the conversion report.

Parameters

source OfficeIMO.OpenDocument.OdtDocument required
path string required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionReport
public static OfficeConversionReport SaveAsWord(OdtDocument source, Stream stream, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Writes the converted output to a caller-owned stream, which stays open and returns the conversion report.

Parameters

source OfficeIMO.OpenDocument.OdtDocument required
stream System.IO.Stream required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionReport
SaveAsWordAsync 2 overloads
public static async Task<OfficeConversionReport> SaveAsWordAsync(OdtDocument source, string path, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously writes the converted output to a path and returns the conversion report.

Parameters

source OfficeIMO.OpenDocument.OdtDocument required
path string required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionReport>
public static async Task<OfficeConversionReport> SaveAsWordAsync(OdtDocument source, Stream stream, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously writes the converted output to a caller-owned stream and returns the conversion report.

Parameters

source OfficeIMO.OpenDocument.OdtDocument required
stream System.IO.Stream required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionReport>
ToOpenDocument 2 overloads
public static OdtDocument ToOpenDocument(WordDocument source, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Converts a Word document to an in-memory ODT text document; the LossPolicy option rejects loss.

Parameters

source OfficeIMO.Word.WordDocument required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OdtDocument
public static OdtDocument ToOpenDocument(WordDocument source, WordOpenDocumentConversionOptions? options, out OfficeConversionReport report, CancellationToken cancellationToken = default) #

Converts a Word document to an in-memory ODT text document; the LossPolicy option rejects loss and returns the completed conversion report.

Parameters

source OfficeIMO.Word.WordDocument required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? required
report OfficeIMO.OfficeConversionReport required
cancellationToken System.Threading.CancellationToken = default optional

Returns

OdtDocument
public static Task<OfficeConversionResult<OdtDocument>> ToOpenDocumentAsync(WordDocument source, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Converts a Word document to an in-memory ODT text document; the LossPolicy option rejects loss, returning the value and report together.

Parameters

source OfficeIMO.Word.WordDocument required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionResult<OdtDocument>>
ToWord 2 overloads
public static WordDocument ToWord(OdtDocument source, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Converts an ODT text document to an in-memory Word document; the LossPolicy option rejects loss.

Parameters

source OfficeIMO.OpenDocument.OdtDocument required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

WordDocument
public static WordDocument ToWord(OdtDocument source, WordOpenDocumentConversionOptions? options, out OfficeConversionReport report, CancellationToken cancellationToken = default) #

Converts an ODT text document to an in-memory Word document; the LossPolicy option rejects loss and returns the completed conversion report.

Parameters

source OfficeIMO.OpenDocument.OdtDocument required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? required
report OfficeIMO.OfficeConversionReport required
cancellationToken System.Threading.CancellationToken = default optional

Returns

WordDocument
public static Task<OfficeConversionResult<WordDocument>> ToWordAsync(OdtDocument source, WordOpenDocumentConversionOptions? options = null, CancellationToken cancellationToken = default) #

Converts an ODT text document to an in-memory Word document; the LossPolicy option rejects loss, returning the value and report together.

Parameters

source OfficeIMO.OpenDocument.OdtDocument required
options OfficeIMO.Word.OpenDocument.WordOpenDocumentConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionResult<WordDocument>>