Drag and Drop Outlook mails into a Windows Form Control with eml extension

Status
Not open for further replies.
H

hemaneelagiri

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
 
RE: Drag and Drop Outlook mails into a Windows Form Control with eml

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
> .
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R PST->Outlook.com (Import vs Drag-n-Drop methods Using Outlook.com accounts in Outlook 2
J Can Click to Drag Custom Form Field But Cannot Drop When Designing in Outlook 2007 Outlook VBA and Custom Forms 2
K Cannot consistently drag and drop .msg files into Outlook 2010 Using Outlook 0
F Tumblr - Drag & Drop files (pictures) into Outlook? Using Outlook 12
V Drag and drop into Outlook folders Using Outlook 2
R Outlook 2007 - drag drop email to Explorer Using Outlook 1
J Problem using drag and drop to attach an html email in Outlook 2010 Using Outlook 18
N Drag and drop attachment in outlook addin Outlook VBA and Custom Forms 4
A Implementing Drag and drop events in outlook Outlook VBA and Custom Forms 7
P Drag and Drop mails from Outlook to Clarion6 Application Outlook VBA and Custom Forms 5
M Extract "Date sent" from emails (saved to folder using drag and drop) Outlook VBA and Custom Forms 1
C Cannot drag and drop or create folder in PST file folders Using Outlook 1
L Copying Emails using drag and drop Using Outlook 2
T drag drop/opening drop down/single click acts like double/highlighting Using Outlook 7
M Drag and drop Outlook VBA and Custom Forms 1
S Drag-and-drop to Custom Task Pane Outlook VBA and Custom Forms 2
L Macro to add Date & Time etc to "drag to save" e-mails Outlook VBA and Custom Forms 17
S Renaming while drag and dropping to file Using Outlook 1
B Right click-drag no longer creates hyperlinks Using Outlook 2
T Can not drag e-mails from search to folders Using Outlook 1
S cannot drag emails to personal folders BCM (Business Contact Manager) 1
J How to create a drop down user defined field that will appear on an inbox view Outlook VBA and Custom Forms 8
D Outlook 2013 Macros only run in VB editor, not in drop down or button Outlook VBA and Custom Forms 14
Z See "Change View" Drop Down as a List? Using Outlook 1
Y Outlook Task View - Table Format - Customize Reminder Time to Drop-Down Selection Using Outlook 2
D BCM 2013 not functioning as BCM 2010 Example no drop down for communications history Using Outlook 0
M Same file "stuck" on top of file list in "Attach File" drop down Using Outlook 4
A Automatically send email based on drop-down field? Outlook VBA and Custom Forms 2
Diane Poremsky No drop down calendars in Outlook 2010 Print Options Using Outlook 0
P BCM 2013 Contacts Form Drop Down Box Bug BCM (Business Contact Manager) 1
P Field in Forms displayed depending on the Item chosen from drop-down-list BCM (Business Contact Manager) 1
M Add custom locations to Outlook Forms "Look In:" drop-down list Using Outlook 5
M How do I link a drop down box to a percent complete box Using Outlook 4
R Display multiple accounts as drop down in the from field in New Mail Using Outlook 1
S Outlook addin formregion as a drop down Outlook VBA and Custom Forms 6
S RE: Template with drop down Outlook VBA and Custom Forms 3
C Drop Down Box in Email Template Outlook VBA and Custom Forms 2
M Outlook 2016 still feature updating Using Outlook 0
e_a_g_l_e_p_i Question about Outlook 2021 and Gmail Using Outlook 9
J Outlook VBA to send from Non-default Account & Data Files Outlook VBA and Custom Forms 2
P Limited Support for 3rd Party Mail in new Outlook? Using Outlook 1
O Any 3rd party tool that sync (mirror) from Outlook Calendar to Google Calendar? Using Outlook 5
T Outlook is categorizing emails incorrectly Using Outlook 1
R Legacy Outlook on Mac Email Cache Using Outlook 0
A Outlook can't remember outlook.com, Exchange password. Using Outlook 6
S Related messages show in main Outlook window vice new Advanced Find windows Using Outlook 1
H Force Outlook 2019 with GMail 2-Step to Require Login? Using Outlook 0
G Retaining Tabs in outlook body Using Outlook 2
V Setting up Outlook 2021 on new computer Using Outlook 2
G Add Map It button to Custom Contacts Form in Outlook Outlook VBA and Custom Forms 1

Similar threads

Back
Top