![]() |
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
|
|||
|
|||
![]()
Hello everyone!
I would like to imitate Outlooks Drag & Drop functionality on this case: When you drag and drop an email message into the body of a Outlook Task Item you normally receive a clickable link (named like the emails subject), which, when clicked, opens the dropped email. I would like to create such a link/reference using a ComAddIn. So far I tried and succeeded to add an email to a task item as an attachment. the email also appears in the body of the task item but is not clickable to open the email. my source code looks like this: Code: using MOIO = Microsoft.Office.Interop.Outlook; .... //get the task item MOIO.NameSpace olNS = ((MOIO.Application)applicationObject).GetNamespace ("MAPI"); MOIO.TaskItem iTaskItem = (MOIO.TaskItem) olNS.GetItemFromID(itemEntryID, itemStoreID); //get the mail item (same subject) MOIO.MailItem iMailItem = null; MOIO.MAPIFolder oMailFolder = getFolder("Posteingang"); MOIO.Items oItems = oMailFolder.Items; foreach (MOIO.MailItem mail in oItems){ if (mail.MessageClass == "IPM.Note" && mail.Subject.Equals(iTaskItem.Subject.ToString())) { iMailItem = mail; } } //add mail as attachment to task item iTaskItem.Attachments.Add(iMailItem, MOIO.OlAttachmentType.olByReference, iTaskItem.Body.Length+1, iMailItem.Subject); .... Can I use the method Attachments.Add to achieve this? do i have to alter the parameters? in the link you can see the result. left attachment is added manually, right attachment is added programmatically by my addin http://web.inf.tu-dresden.de/~oj8534...chment.Add.GIF I'd appreciate any suggestions! Ciao Ole Jaekel |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Only when i forward emails with attachements "550 relaying mail to" [domain] "is not allowed" | Alchemy | Outlook - General Queries | 4 | March 8th 06 11:47 PM |
Export & Import of outlook 2003 "User Defined Fields" at folder le | Kamele0n | Outlook - Using Contacts | 1 | February 25th 06 04:34 PM |
Can not Drag and Drop when using imap | [email protected] | Outlook - General Queries | 0 | February 7th 06 02:47 PM |
Can't Drag & Drop between outlook 2003 & sharepoint calendar | Rainman | Outlook - Calandaring | 0 | February 1st 06 03:00 PM |