InsertFromFile Method [Visio 2003 SDK Documentation]
Adds a linked or embedded object to a page, master, or group.
objRet = object**.InsertFromFile**(filename, flags)
objRet A Shape object representing the newly linked or embedded object.
object Required. An expression that returns a Page, Master, or Shape object in which to embed or link the object.
filename Required String. The name of the file that contains the object to link or embed.
flags Required Integer. Flags that influence how the object is inserted.
Version added
4.1
Remarks
The InsertFromFile method creates a new shape that represents a linked or embedded OLE object.
The flags argument is a bit mask that should be a combination of the following values.
Constant | Value | Description |
---|---|---|
visInsertLink |
&H8 |
If set, the new shape represents an OLE link to the named file. Otherwise, the InsertFromFile method produces an OLE object from the contents of the named file and embeds it in the document that contains the page, master, or group. |
visInsertIcon |
&H10 |
Displays the new shape as an icon. |
Security Use caution when you are adding ActiveX controls to your application. ActiveX controls may be designed in such a way that their use could pose a security risk. We recommend that you use controls from trusted sources only.
Applies to | Master object | Page object | Shape object
See Also | InsertObject method