PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Syncronize contact body when create task from it?
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Syncronize contact body when create task from it?
![]() |
Syncronize contact body when create task from it? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi, does someone have a little code snippet for this, to run in the current
user/session ( for my self, actually..) ? Or at least a start to it or a hint? I have coded Excel VBA a lot but are new with the objects, props and events in outlook... You know, when there is a contact item open and you use button/activity "create task for user", a empty task with only the link to the Contact name is in the new task? A/ I need a macro to syncronize the information in the contact body, "the note field", to the similar in the new task. B/ When I close the taskitem, I want to syncronize it again. The fields can contain formats and pictures... /Kindest Regards |
|
|
|
#2 |
|
Guest
Posts: n/a
|
NewInspector is the event that fires when new items are opened. You declare
an Inspectors collection WithEvents so you can handle NewInspector. Then when the item is opened in that event handler you would check for Inspector.CurrentItem.Class to see if it's olTask. If it is you can set a TaskItem equal to the new item and check for TaskItem.Links.Count = 1. That would tell you that the task was opened with an entry in the Contacts field. You could then get TaskItem.Body (the Notes field) and set a ContactItem equal to TaskItem.Links.Item(1). That would be the related contact. ContactItem.Body could be read and then added to TaskItem.Body. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Marie J-son" <No@email.com> wrote in message news:u45CpxyGFHA.3908@TK2MSFTNGP10.phx.gbl... > Hi, does someone have a little code snippet for this, to run in the > current user/session ( for my self, actually..) ? Or at least a start to > it or a hint? I have coded Excel VBA a lot but are new with the objects, > props and events in outlook... > > You know, when there is a contact item open and you use button/activity > "create task for user", a empty task with only the link to the Contact > name is in the new task? > > A/ I need a macro to syncronize the information in the contact body, "the > note field", to the similar in the new task. > B/ When I close the taskitem, I want to syncronize it again. > > The fields can contain formats and pictures... > > /Kindest Regards > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

