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
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...
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
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...