API Reference
Class
WordEmbeddedObject
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
- Paragraph that will host the embedded object.
- wordDocument OfficeIMO.Word.WordDocument
- Parent WordDocument.
- fileName System.String
- Path to the file to embed.
- fileImage System.String
- Path to the icon representing the embedded object.
- description System.String
- Description for the embedded object.
- width System.Nullable{System.Double} = null
- Width of the icon in points. Defaults to 64.8.
- height System.Nullable{System.Double} = null
- 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
- Paragraph that will host the object.
- wordDocument OfficeIMO.Word.WordDocument
- Parent document.
- fileName System.String
- File to embed.
- options OfficeIMO.Word.WordEmbeddedObjectOptions
- 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
- Parent document.
- run DocumentFormat.OpenXml.Wordprocessing.Run
- Run holding the embedded object.
Methods
public EmbeddedObject GenerateEmbeddedObject(String imageId, String packageEmbedId, String programId, Double width, Double height) #Returns:
EmbeddedObjectCreates a new embedded object element using the provided identifiers.
Parameters
- imageId System.String
- Relationship ID of the preview image.
- packageEmbedId System.String
- Relationship ID of the embedded package.
- programId System.String
- Program identifier describing the embedded content.
- width System.Double
- Width of the object icon in points.
- height System.Double
- Height of the object icon in points.
Returns
The constructed EmbeddedObject instance.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object