![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi
i want to drag and drop mails from outlook to my application. i am able to drag and srop but those file s are saving as .msg . but i want it into eml and after that it should be like ordinary file i am droping like this string[] filenames = (string[])dataObject.GetData ("FileGroupDescriptor"); MemoryStream[] filestreams = (MemoryStream[])dataObject. GetData("FileContents"); string strPath = GetTempPath() + @"OutLookFiles"; try { if (!Directory.Exists(strPath)) { DirectoryInfo di = Directory.CreateDirectory(strPath) ; di = null; } } catch (Exception ex) { throw ex; } finally { } bool bAutoSaved = false; for (int fileIndex = 0; fileIndex filenames.Length; fileIndex++) { //use the fileindex to get the name and data stream string filename = filenames[fileIndex]; MemoryStream filestream = filestreams[fileIndex]; //save the file stream using its name to the application path FileStream outputStream = File.Create(strPath + @"/" + filename); filestream.WriteTo(outputStream); outputStream.Close(); filestream.Close(); //FileInfo tempFile = new FileInfo(Common. GetMosaiqueTempPath() + filename); importFiles(strPath + @"/" + filename, ref bAutoSaved, bCreateShortcut); //File.Delete(Common.GetMosaiqueTempPath() + filename); } but this file is saving in .msg file. and when i am droping mail into my application if that mail has any appointments. that appointment should be added like another file. please help me |
Ads |
#2
|
|||
|
|||
![]()
Hi hemaneelagiri
I have a question about the dataObject. How doo you create the dataObject object? rino "hemaneelagiri" wrote: Hi i want to drag and drop mails from outlook to my application. i am able to drag and srop but those file s are saving as .msg . but i want it into eml and after that it should be like ordinary file i am droping like this string[] filenames = (string[])dataObject.GetData ("FileGroupDescriptor"); MemoryStream[] filestreams = (MemoryStream[])dataObject. GetData("FileContents"); string strPath = GetTempPath() + @"OutLookFiles"; try { if (!Directory.Exists(strPath)) { DirectoryInfo di = Directory.CreateDirectory(strPath) ; di = null; } } catch (Exception ex) { throw ex; } finally { } bool bAutoSaved = false; for (int fileIndex = 0; fileIndex filenames.Length; fileIndex++) { //use the fileindex to get the name and data stream string filename = filenames[fileIndex]; MemoryStream filestream = filestreams[fileIndex]; //save the file stream using its name to the application path FileStream outputStream = File.Create(strPath + @"/" + filename); filestream.WriteTo(outputStream); outputStream.Close(); filestream.Close(); //FileInfo tempFile = new FileInfo(Common. GetMosaiqueTempPath() + filename); importFiles(strPath + @"/" + filename, ref bAutoSaved, bCreateShortcut); //File.Delete(Common.GetMosaiqueTempPath() + filename); } but this file is saving in .msg file. and when i am droping mail into my application if that mail has any appointments. that appointment should be added like another file. please help me . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drag and Drop Outlook mails into a Windows Form Control with eml extension | hemaneelagiri | Add-ins for Outlook | 0 | January 19th 10 03:20 PM |
Drag and Drop mails from Outlook to Clarion6 Application | Peter | Outlook and VBA | 5 | July 3rd 09 08:34 AM |
Drag on Drop from email message to custom form - no attachment | Matt | Outlook - Using Forms | 1 | March 18th 08 05:39 PM |
Problem with custom form after drag and drop (security related?) | AlanGlover | Outlook - Using Forms | 3 | November 15th 07 06:41 PM |
Can't drag and drop an Excel file from Windows Explorer to new mail message | Nigel Freeney[_2_] | Outlook - General Queries | 4 | July 25th 07 12:58 AM |