Hey there NAV gurus,
When sending mail trough NAV mail doesn't get sent if Outlook isn't open (create mail window pops up, if the user clicks 'Send' mail goes into 'Outbox' of Outlook. Mail gets sent only after the user starts up outlook. We're using CU 397.
I've come up with a code which opens Outlook (see below). Is there any way to check from nav if Outlook is already open or not?
CREATE(OutlookApp, FALSE, TRUE);
OutlookNamespace := OutlookApp.GetNamespace('MAPI');
OutlookNamespace.Logon('', '', FALSE, FALSE);
OutlookFolder := OutlookNamespace.GetDefaultFolder(6);
OutlookFolder.Display;
We are using Office 365.
I've tried solution:
IF Mail.TryInitializeOutlook THEN
Mail.NewMessage(ToAddresses,CCAddresses,BCCAddresses,Subject,BodyText,AttachFileNameText,TRUE);
ELSE
but TryInitializeOutlook always returns TRUE (even if Outlook is not running).
0