OfficeIMO

API Reference

Class

WordEmbeddedObject

Namespace OfficeIMO.Word
Assembly OfficeIMO.Word

Represents an embedded object, such as a spreadsheet or PDF file, within a WordDocument.

Inheritance

  • Object
  • WordEmbeddedObject

Constructors

WordEmbeddedObject 3 overloads
public WordEmbeddedObject(WordParagraph wordParagraph, WordDocument wordDocument, String fileName, String fileImage, String description, Nullable<Double> width = null, Nullable<Double> height = null) #

Initializes a new instance of the WordEmbeddedObject class and inserts it into the specified WordParagraph.

Parameters

wordParagraph OfficeIMO.Word.WordParagraph requiredposition: 0
Paragraph that will host the embedded object.
wordDocument OfficeIMO.Word.WordDocument requiredposition: 1
Parent WordDocument.
fileName System.String requiredposition: 2
Path to the file to embed.
fileImage System.String requiredposition: 3
Path to the icon representing the embedded object.
description System.String requiredposition: 4
Description for the embedded object.
width System.Nullable{System.Double} = null optionalposition: 5
Width of the icon in points. Defaults to 64.8.
height System.Nullable{System.Double} = null optionalposition: 6
Height of the icon in points. Defaults to 64.8.
WordEmbeddedObject(OfficeIMO.Word.WordParagraph wordParagraph, OfficeIMO.Word.WordDocument wordDocument, System.String fileName, OfficeIMO.Word.WordEmbeddedObjectOptions options) #

Initializes a new instance for unit tests or internal scenarios using specified options.

Parameters

wordParagraph OfficeIMO.Word.WordParagraph required
Paragraph that will host the object.
wordDocument OfficeIMO.Word.WordDocument required
Parent document.
fileName System.String required
File to embed.
options OfficeIMO.Word.WordEmbeddedObjectOptions required
Options controlling icon and dimensions.
WordEmbeddedObject(OfficeIMO.Word.WordDocument wordDocument, DocumentFormat.OpenXml.Wordprocessing.Run run) #

Initializes a new instance that wraps an existing Run containing an embedded object.

Parameters

wordDocument OfficeIMO.Word.WordDocument required
Parent document.
run DocumentFormat.OpenXml.Wordprocessing.Run required
Run holding the embedded object.

Methods

public EmbeddedObject GenerateEmbeddedObject(String imageId, String packageEmbedId, String programId, Double width, Double height) #
Returns: EmbeddedObject

Creates a new embedded object element using the provided identifiers.

Parameters

imageId System.String requiredposition: 0
Relationship ID of the preview image.
packageEmbedId System.String requiredposition: 1
Relationship ID of the embedded package.
programId System.String requiredposition: 2
Program identifier describing the embedded content.
width System.Double requiredposition: 3
Width of the object icon in points.
height System.Double requiredposition: 4
Height of the object icon in points.

Returns

The constructed EmbeddedObject instance.