Imports data from a translation project from and for a single target language.

Syntax:

ImportFromProject(FromProj As String, FromLang As String, ToLang As String, 
                  enumData As ImportExportData, enumOption As ImportProjectOptions, 
                  [HTMLReportFile As String], [showProgressDlg As Boolean = False]) As Boolean
Return: Boolean. "True" if successful. Else "False".
Parameters:
FromProj: File name of the project to import from. File extension *.fsmdb. or *.rwtproject.
FromLang: Language to import the data from (source language).
ToLang: Language to import the data for (target language).
enumData: Data to be imported. Type: enum "ImportExportData"
enumOption: Import options. Type: enum "ImportProjectOptions"
HTMLReportFile: File name of the HTML Report fle created while importing data.
                 Optional parameter (default: empty string ("")).
showProgressDlg: Open a progress dialog box while the import is running.
                 Optional parameter (default: False).
Example:

Example 1
---------
Dim Proj As TranslationProject
Set Proj = RCWinTrans.ActiveProject
    
If Not (Proj Is Nothing) Then
 bVal = Proj.ImportFromProject("c:\transl.fsmdb", "de", "de", \
                                iedata_text, ipoption_setrecheckmarker )
End if


Example 2
---------
Dim Proj As TranslationProject
Set Proj = RCWinTrans.ActiveProject
    
If Not (Proj Is Nothing) Then
 bVal = Proj.ImportFromProject("c:\transl.fsmdb", "de", "de", \
                                iedata_text + iedata_size, \
                                ipoption_createreport + ipoption_setrecheckmarker, \
                                "c:\impreport.htm", False)
End if
Remarks:
Event "OnSetTargetText"
--------------------------------
When data are imported for an item then RC-WinTrans fires the event "OnSetTargetText". Catching this event can be used e.g. to monitor when a target text is imported and assigned. To catch an RC-WinTrans event requires to use an event handler class in the VBA project.

Example: Class Module to catch the RC-WinTrans ebent "OnSetTargetText"
--------------------------------------------------------------------------------------------
  Public WithEvents EventHandler As Application

  Private Sub Class_Initialize()
     Set EventHandler = Application
   End Sub

  Private Sub EventHandler_OnSetTargetText(ByVal TU As TransUnit)
     ' -> do something here
  End Sub

--------------------------------------------------------------------------------------------

See also:

Class TranslationProject | TranslationProject.ExportProject | Application.OnSetTargetText


Last Updated: 09/18/09