Hi All,
I can save an outlook email via a drag and drop onto a listview. The code looks something like this:
When this code is run, Outlook will correctly display a dialog asking for permission to allow access.
This all works great on my development machine but I can't get it to work when I deploy my app onto another PC. Does anyone know what i'm missing?
I deploy Microsoft.Office.Interop.Outlook.dll and office.dll
Any help would be appreciated.
Thanks
Ry
I can save an outlook email via a drag and drop onto a listview. The code looks something like this:
Code:
Microsoft.Office.Interop.Outlook.Application OL = new Microsoft.Office.Interop.Outlook.Application();
for (int i = 1; i <= OL.ActiveExplorer().Selection.Count; i++)
{
Object selObject = OL.ActiveExplorer().Selection[i];
if (selObject is Microsoft.Office.Interop.Outlook.MailItem)
{
Microsoft.Office.Interop.Outlook.MailItem mi = (selObject as Microsoft.Office.Interop.Outlook.MailItem);
sSub = mi.Subject.Replace(":", "");
mi.SaveAs(sAttDir + "\\" + sSub + ".msg", Microsoft.Office.Interop.Outlook.OlSaveAsType.olMSG);
}
}
When this code is run, Outlook will correctly display a dialog asking for permission to allow access.
This all works great on my development machine but I can't get it to work when I deploy my app onto another PC. Does anyone know what i'm missing?
I deploy Microsoft.Office.Interop.Outlook.dll and office.dll
Any help would be appreciated.
Thanks
Ry