I try to send a mail with Outlook. It works fine, but I can't fill the To: line. Below is the code I use.
---
CREATE(OutlookApplication);
OutLookMailItem := OutlookApplication.CreateItem(0); // 0 = E-Mail
OutLookMailItem.Body := txtBody;
OutLookMailItem.Subject := txtSubjekt;
// OutLookMailItem.To := ToName;
OutLookMailItem.CC := CCName;
OutLookMailItem.Send;
CLEAR(OutlookApplication);
---
Navision rejects the line with OutLookMailItem.To. The error message in German is:
"Es wurde ein Feld einer Datensatzvariablen erwartet. Zum Beispiel:
Datensatz.Feld
Debitor.Name"
What am I doing wrong?
0
Comments
To solve your problem you have to
quot the string like OutLookMailItem."To".
[This message has been edited by Bay (edited 03-03-2000).]