GetExpandedTransFileName() As String

Job object

This method returns a string from the current Transfer job.

If the method is called before the job is started, the string from the File box on the Transfer tab of the Job description dialog is returned. If the method is called after the job is started, the returned string is a full path with an expanded file extension.

The difference between this method and GetTransFileName is that this one returns the expanded file name regardless of the transfer method, whereas GetTransFileName returns the expanded name only when you are transferring forms To file.

Suggested use: If you were to create your own file management routines, you could place this function on the FormTransferRecord event, to manipulate the transfer buffer and then write the file from code.

Example

Function OnFormTransferRecord(FormTransBuffer As String, FormTransBufferSize As Long) As Long

Dim objJob As Object

    Set objJob = Application.Job

Dim strFileName As String

    strFileName = objJob.GetExpandedTransFileName

Dim strNewBuffer As String

'Get the first 10 characters of the Transfer buffer

    strNewBuffer = Left(FormTransBuffer, 10)

Open strFileName For Output As #1

        Print #1, strNewBuffer

    Close #1

OnFormTransferRecord = EV_OK_ABORT ' Return value to FORMS

End Function

GetTransFileName

SetTransFileName

The Job object