Back to Devexpress

NestedShapeCollection.AddOleObject(String, String, Image, PointF) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-nestedshapecollection-dot-addoleobject-x28-system-dot-string-system-dot-string-system-dot-drawing-dot-image-system-dot-drawing-dot-pointf-x29.md

latest2.7 KB
Original Source

NestedShapeCollection.AddOleObject(String, String, Image, PointF) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

Adds a linked OLE object to a shape group or a drawing canvas. The object is displayed in the document as an image.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
[Browsable(false)]
NestedShape AddOleObject(
    string fileName,
    string progId,
    Image presentation,
    PointF location
)
vb
<Browsable(False)>
Function AddOleObject(
    fileName As String,
    progId As String,
    presentation As Image,
    location As PointF
) As NestedShape

Parameters

NameTypeDescription
fileNameString

A path to the file associated with the OLE object.

| | progId | String |

The file type. You can use constant fields of the OleObjectType class to set this value.

| | presentation | Image |

The image that displays OLE object content.

| | location | PointF |

An object that defines the object’s location (relative to the top left corner of the parent object). The Document.Unit property specifies measurement units.

|

Returns

TypeDescription
NestedShape

The OLE object in the group or drawing canvas.

|

See Also

NestedShapeCollection Interface

NestedShapeCollection Members

DevExpress.XtraRichEdit.API.Native Namespace