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
 
R

rino

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
A turn Outlook into a Drag-and-drop application Outlook Wishlist 2
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
Forum Admin Wishlist Drag and drop email to a calendar date Outlook Wishlist 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 14
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
J Outlook 2016 Can't display some embedded HTML images in Outlook 2016 Using Outlook 2
J Outlook EAS protocol version Using Outlook 1
N Outlook 2021 'Run Script" Rules? Outlook VBA and Custom Forms 4
C Why does Outlook (desktop) 365 for Windows keep making me input my passwords? Using Outlook 8
P Comcast IMAP broken but their second level support said to call "the Outlook company" Using Outlook 4
bdsermons Outlook 365 command button in outlook form Outlook VBA and Custom Forms 4
B iCloud telling me my Outlook is not supported Using Outlook 2
cheapfaremart Which outlook version is best? Using Outlook 0
T Outlook 2021 Cannot open attachments Outlook DeskTop 2021 Using Outlook 0
M Outlook settings will not accept a password Using Outlook 9
C Outlook FROM ADDRESS -Outlook.com and Android Using Outlook 1

Similar threads

Top