A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 19th 10, 03:20 PM posted to microsoft.public.outlook.program_addins
hemaneelagiri
external usenet poster
 
Posts: 7
Default Drag and Drop Outlook mails into a Windows Form Control with eml extension

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  
Old March 3rd 10, 11:41 AM posted to microsoft.public.outlook.program_addins
Rino
external usenet poster
 
Posts: 2
Default 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
.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 01:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.