Import Method [Visio 2003 SDK Documentation]
Imports a file into the current document.
objRet = object**.Import**(fileName)
objRet A Shape object that represents the new shape imported from the file.
object Required. An expression that returns the Page, Master, or Shape object to receive the new shape.
fileName Required String. The name of the file to import; must be a fully qualified path.
Version added
3.0
Remarks
The Import method imports the file specified by fileName onto a page, or into a master or group.
The file extension indicates which import filter to use. If the filter is not installed, the Import method returns an error. The Import method uses the default preference settings for the specified filter and does not prompt the user for non-default arguments.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Import method to import a bitmap image onto the drawing page. This example assumes that there is a file with the name sampleImage.bmp on the C: drive of your computer.
Public Sub Import_Example()
ActivePage.Import ("C:\sampleImage.bmp")
End Sub
Applies to | Master object | Page object | Shape object
See Also | Export method