Documentation Center

PslProject.Export

Exports one or more string lists to a specified file. If the export functions has options, the last options set manually will be used for the export. Returns True, if the operation was successful. False indicates an error.

This function does not create translation bundles. It uses a PslTransBundle object only to collect multiple string lists for export. Use PslProject.ExportTransBundle to export a translation bundle.

Syntax

Expression.Export (Format as String, TransBundle as PslTransBundle, FileName as String, Range as Variant) as Boolean

Expression Required. Object of type PslTransList

Format Identifier of the add-in which is used for export. The add-in list in SDL Passolo displays the identifier of each add-in. These are the add-ins that are shipped with Passolo:

"Glossary Export"

"PASSOLO Glossary Maker"

"TMX Export"

"STAR TermStar Export"

"TRADOS MultiTerm"

"TRADOS MultiTerm iX"

"PASSOLO Customizable Text Export"

"SDL Passolo XML Export/Import"

"Trados Text Export"

TransBundle Translation bundle object, which contains the string lists

FileName Name of the export file

Range One of these values

expAll (default) - export all (undeleted) strings

expAllDeleted - exports all strings including the deleted strings

expDisplay - exports only displayed strings

expSelected - exports only selected strings

Example

' Creates a text export file for each language
Sub main
  Dim prj As PslProject 
  Set prj = PSL.ActiveProject 
  If prj Is Nothing Then Exit Sub 
 
  Dim lang As PslLanguage 
  For Each lang In prj.Languages 
    ' Create the translation bundle 
    Dim bundle As PslTransBundle
    Set bundle = prj.PrepareTransBundle
 
    Dim trn As PslTransList 
    dim i as Integer
    For i = 1 to prj.TransLists.Count
      set trn = prj.TransLists(i)
      If trn.Language Is lang Then 
        bundle.AddTransList(trn)
      End If
    Next i 
   
    ' Make filename "test<langcode>.tba/tbu" 
    Dim filename As String 
    filename = "c:\test\test" & lang.LangCode & ".txt"
    prj.Export "PASSOLO text format", bundle, filename
  Next lang
End Sub