Target File Name Macro


The "TargetFileName" macro is called by RC-WinTrans each time the name (and path) of a target file is required by the system, e.g., whenever RC-WinTrans is told to create a target file.  This macro is supplied with the default target file name in the parameter "DefaultName."  Use the macro to modify the default target file name or to return a target file name generated on your own.



Enabling/Disabling the Macro

Enable/Disable the calling of the macro in the Target File Names dialog box (Source and Target Files dialog box | Target Files property page).  Open this dialog using the Target file name command button found on the Target Files property page (bottom, right).



Specifying the Macro to be Called

RC-WinTrans calls the "GetTargetFileName" macro in the "UserMacro" file/project by default.  The location (implementation- which macros file and which module) of the macro can be specified in the VBA Macro Specification dialog box.



VBA Code

The default implementation of the "GetTargetFileName" macro in the "UserMacros" file:


Function   GetTargetFileName  ( ProjFileName As String, _

SourceFileName As String, _

XLIFFDataType As String, _

TargetLang As String, _

DefaultName As String) As String

' return an empty string to use the default ("DefaultName")

GetTargetFileName = ""


End Function




A description of the parameters can be found where the macro is implemented.


See also:  "User Macros."