i want to put the name of the attachment into the mail and have written a program
which runs on gw7

For Zaehler = 0 To Nummer - 1
MyMessageid = "X00"
ParamStr = "ItemAttachmentGetDisplayname(""" + MyMessageid + """; " & Zaehler & ")"
iRet = vCommander.Execute(ParamStr, Sresult)
MyText = Chr$(10) & Sresult & Chr$(10)
ZwischEn = Sresult
If ZwischEn <> "Dokumentverweis Anlage" And ZwischEn <> "Mail Anlage" Then
MyText = Chr$(10) & "Dateianlage : " & Sresult & Chr$(10)
ParamStr = "ItemSetText(""" + MyMessageid + """; 10;""" + MyText + """; 1; 0)"
iRet = vCommander.Execute(ParamStr, Sresult)
End If
If ZwischEn = "Mail Anlage" Then
ParamStr = "ItemAttachmentGetName(""" + MyMessageid + """; " & Zaehler & ")"
iRet = vCommander.Execute(ParamStr, Sresult)
MyMessageid = Sresult
ParamStr = "ItemGetText(""" + MyMessageid + """; 9 )"
iRet = vCommander.Execute(ParamStr, Sresult)
MyText = Chr$(10) & "Mail Anlage : " & Sresult & Chr$(10)
MyMessageid = "X00"
ParamStr = "ItemSetText(""" + MyMessageid + """; 10;""" + MyText + """; 1; 0)"
iRet = vCommander.Execute(ParamStr, Sresult)
End If
If ZwischEn = "Dokumentverweis Anlage" Then
ParamStr = "ItemAttachmentGetName(""" + MyMessageid + """; " & Zaehler & ")"
iRet = vCommander.Execute(ParamStr, Sresult)
MyMessageid = Sresult
ParamStr = "ItemGetText(""" + MyMessageid + """; 9 )"
iRet = vCommander.Execute(ParamStr, Sresult)
MyText = Chr$(10) & "Dokumentverweis Anlage : " & Sresult & Chr$(10)
MyMessageid = "X00"
ParamStr = "ItemSetText(""" + MyMessageid + """; 10;""" + MyText + """; 1; 0)"
iRet = vCommander.Execute(ParamStr, Sresult)
End If
Next Zaehler

and in GW 7.01 with mail anlage and with dokumentverweis anlage i always get
Token failed execution!

why

thanks for help

andreas