ImportCurrentObjectPropertyAsBlob method (WinStudio scripts)

Applies To

IWSIDOCollection interface

Definition

Retrieves a binary large object (BLOB), such as a graphic image, from a file and loads it into the currently active property of a collection.

Syntax

object.ImportBlob( propertyName, 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.
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 ImportObjectPropertyAsBlob method is that this one imports the BLOB to the currently active object, and ImportObjectPropertyAsBlob imports the BLOB to an object from a specified (other) row.

Example

This example imports a BLOB from a bitmap file named Splash.BMP into a property named Photo and then exports it 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.ImportCurrentObjectPropertyAsBlob( PropertyName, FileName ) 
   FileName = "C:\Temp\Splash_VBA_TEST.BMP"
   ThisForm.PrimaryIDOCollection.ExportCurrentObjectPropertyAsBlob( PropertyName, FileName )
End Sub