Doubt about MailItem automation NAV2015

kanikakanika Member Posts: 247
edited 2019-03-27 in NAV Three Tier
Hi experts!!
I have the following code that automatically sends an email with a Word file in the message.
Now I need it not to be sent but to stay the dialog open for the user to decide whether to send it or not.
I tried to comment the line "objMailItem.Send" but does not work.

objMailItem:= MailApp.CreateItem(0);
objMailItem := WordDoc.MailEnvelope.Item;
objMailItem.BodyFormat := 2;
objMailItem.Subject :=strSubject;
objMailItem."To" := email;
objMailItem.ReadReceiptRequested(TRUE);
objAttachments := objMailItem.Attachments;
objAttachments.Add(strRouteAttachemntFile+strSubject,1,1,'Invoice');
objMailItem.Display(TRUE);
objMailItem.Send;

How do you do it?

Thanks again.
Sign In or Register to comment.