Example of using the GCDtaus-Dll, from MS-Excel
If you keep your payment data in an MS-Excel file, you can use the following macro (you will have to adjust it a little to suit your own fields order and positions) to generate a dtaus file.

Add a button to your MS-Excel worksheet ( from the toolbox bar included in the "Visual Basic" menu). You can use the button's click event to start the macro (download this demo to see an example in action).

If you haven't yet, please take a short look at the API documentation to familiarize yourself with the objects that compose the library.

			
			
Dim strError As String
Dim row As Integer
 
'Declare the Dtaus dll objects we are going to use.
'
Dim dtaus As DtausDatei
Dim meineBankInfo As MeineInfo
Dim gt As GeldTransfer

'Create the dtaus main object
Set dtaus = New DtausDatei
'
dtaus.Pfad = Range("B3")

'Get a reference to the MeineInfo object,
'that was created internally by DtausDatei object
Set meineBankInfo = dtaus.GetMeineInfo

'Set MeineInfo object properties... '
meineBankInfo.DateiMedia = MediaTyp.Diskette
meineBankInfo.GeldTransferTyp = TransferTyp.Lastschrift
'
meineBankInfo.BLZ = Range("A7")
meineBankInfo.Konto = Range("B7")
meineBankInfo.Name = Range("C7")
'
'
If meineBankInfo.MeineInfoIsValid = False Then
    MsgBox meineBankInfo.MeineInfoErrors
    Exit Sub
End If
'
'
row = 1

'For each row that contains a payment,
'create a GeldTransfer object and add it
'to the DtausDatei.
Do While Not IsEmpty(Range("D7").Cells(row, 1))
    '
    Set gt = New GeldTransfer
    '
    gt.BLZ = Range("D7").Cells(row, 1)
    gt.Konto = Range("D7").Cells(row, 2)
    gt.Name = Range("D7").Cells(row, 3)
    gt.BetragEuro = Range("D7").Cells(row, 4)
    gt.VerwendungsZweck = Range("D7").Cells(row, 5)
    '
    'Check if the GeldTransfer attributes we just added are valid.
    'If not, application display the invalid fields and stops.
    If gt.InputFieldsValid = False Then
        MsgBox gt.InputFieldsErrors
        Exit Sub
    End If
    '
    dtaus.AddGeldTransfer gt
    row = row + 1
    '
Loop
'
'Generate method returns an error string,
'if an error ocurred, an empty string otherwise.
strError = dtaus.generate
'
If strError <> "" Then
    MsgBox strError
End If
'
			
:: back to main page