PslResource.ExportBinary
Writes a binary resource (bitmap, icon, ...) to a file.
Syntax
Expression.ExportBinary (Folder as String , optional FileName as Variant) as String
Expression Object of type PslResource
Folder Target folder for the binary file.
FileName Name of the file to be written. If you omit this parameter or if it is an empty string, SDL Passolo creates a file name with the correct extension. This file name contains internal numbers of the resource, that make it possible to import this file with
Returns the full path of the file, that has been written.
Example
' Exports all bitmaps and icons in the current project
Sub Main
Dim prj As PslProject
Set prj = PSL.ActiveProject
If prj Is Nothing Then Exit Sub
Dim trn As PslTransList
' Loop all translation lists
For Each trn In prj.TransLists
' Loop all resources
For i = 1 To trn.ResourceCount
Dim res As PslResource
Set res = trn.Resource(i)
If res.IsBinary And (res.Type = "Bitmap" Or res.Type = "IconGroup") Then
res.ExportBinary("c:\ExportedImages", "")
End If
Next i
Next trn
End Sub