![]() |
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
|
|||
|
|||
![]()
I want to create a task from an incoming e-mail such that the task
contains a link to the e-mail. Right now I have this: Sub creTask_as_WaitingFor() Dim objApp Dim objItem Dim objTask Dim myRecTime As String Dim myTimeString As String Dim myToString As String ' Get current item Set objApp = CreateObject("Outlook.Application") Set objItem = objApp.ActiveInspector.CurrentItem ' Format stuff - formatting is in Swedish so may look weird myRecTime = CStr(objItem.ReceivedTime) myTimeString = Mid(myRecTime, 9, 2) & Mid(myRecTime, 4, 2) & Mid(myRecTime, 1, 2) myToString = Replace(CStr(objItem.SenderName), "'", "") ' Create task and set fields Set objTask = objApp.CreateItem(olTaskItem) objTask.Subject = myToString & " - " & myTimeString & " - " & objItem.Subject objTask.Body = objItem.Body objTask.ReminderSet = False objTask.Categories = "5 - Waiting For" objTask.Save End Sub This works well. It creates a task, sets the body to the body of the e-mail, sets the subject etc. However, when I open the task, I want it to have a link to the original e-mail or a copy of the e-mail in the task or something similar, so that I can reply to the e-mail without having to find it manually. It doesn't matter much if it's actually a link or a copy. The idea is just that I should be able to reply to the e-mail as quickly as possible from the task. If I manually drag the e-mail from the current folder and drop it on the task, I will get the e-mail in the task, but I haven't figured out how to do that programmatically. |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
link task or email to contact in outlook 2007 | mikem | Outlook - Using Contacts | 4 | September 18th 06 11:59 PM |
Creating an Outlook Task Add-in Solution using AdvancedSearch in C | Tom_in_Atlanta | Add-ins for Outlook | 2 | September 12th 06 03:14 AM |
Help with Code - Creating Status Report from Task items | Steve | Outlook and VBA | 1 | August 2nd 06 06:45 AM |
Creating Task sometimes collapses group | T. Wise | Outlook - General Queries | 3 | July 14th 06 05:46 AM |
Link a task to another task | gary | Outlook and VBA | 1 | January 10th 06 05:21 PM |