Created app who send email in outlook 2016 but not in outlook 2013. Getting error when try to send in outlook 2013

  • Thread starter Thread starter Rinaldo1961
  • Start date Start date
R

Rinaldo1961

Guest
Hi there,

I have an program what is sending email to clients such as invoice in PDF. I have created the program in outlook 2016, but a client of my have outlook 2013. There is an error

1367084.png

The code i have written:

using Microsoft.Office.Interop.Outlook;
using Exception = Microsoft.Office.Interop.Outlook.Exception;
using OutlookApp = Microsoft.Office.Interop.Outlook.Application;

OutlookApp outlookApp = new OutlookApp();

MailItem mailItem = outlookApp.CreateItem(OlItemType.olMailItem);
mailItem.Subject = subject + " " + HovenierStart.bedrijfsNaam;
mailItem.HTMLBody = body;
mailItem.To = email;




mailItem.Attachments.Add(fileNaam);
//Set a high priority to the message
mailItem.Importance = OlImportance.olImportanceHigh;
mailItem.Display(true);


In the init i put:

Type officeType = Type.GetTypeFromProgID("Outlook.Application");

Past the test but failed.

Hoping for a solution

Rinaldo


Greetings from Amsterdam the Netherlands

Continue reading...
 
Back
Top