I have a problem with my Dynamics NAV program. I use this to send an email using MAPI. For this I use the outlook libraries, and this works fine. However, I have one issue: if outlook is not open when I send the mail, I cannot open the attachments that I added to the mail. If outlook is open, I can open the attachments.
This is my code:
CREATE(autOutlookAPP, TRUE, TRUE);
autOutlookNamespace := autOutlookAPP.GetNamespace('MAPI');
autOutlookItem := autOutlookAPP.CreateItem(0);
autOutlookItem.Subject( ... );
autOutlookAtts := autOutlookItem.Attachments;
autOutlookAtts.Add( '...' );
I suspect it has something to do with the logon (permissions), but I'm not sure. Do you have any ideas ?