ImportObjectPropertyAsBlob Method

Applies To

IWSIDOCollection interface

Definition

Imports a binary large object (BLOB), such as a graphic image, from a file and loads it in a specified property of a collection.

Syntax

object.ImportBlob (PropertyName, RowNumber, FileName)

  Part   Description
object Required. An expression that evaluates to the name of an IDO collection object.
PropertyName Required. The name of a Binary property in the collection.
RowNumber Required. An integer indicating the row into which the property is to be imported.
FileName Required. The name of the file containing the BLOB. FileName must include the path. The path can be relative to the directory containing WinStudio.exe.

Remarks

The difference between this method and the ImportCurrentObjectPropertyAsBlob method is that this one imports to an object in a specified (other) row, and ImportCurrentObjectPropertyAsBlob imports the BLOB to the currently active object.

Example

This example imports a bitmap from a file named Splash.BMP into a property named Photo in the fourth row of a collection and then exports it from that row to a temporary file named Splash_VBA_TEST.BMP.

Sub Main()
   Dim PropertyName As String
   Dim FileName As String
   PropertyName = "Photo"
   FileName = ".\res\Splash.BMP"
   ThisForm.PrimaryIDOCollection.ImportObjectPropertyAsBlob( PropertyName, 4, FileName )
   FileName = "C:\Temp\Splash_VBA_TEST.BMP"
   ThisForm.PrimaryIDOCollection.ExportObjectPropertyAsBlob( PropertyName, 4, FileName )
End Sub