How to add a contact to a journal item?

R

ringerxyz

Hi
I use the following code to create a journal item in outlook:

pApp.CreateInstance(__uuidof(Application));
pApp->CreateItem(olJournalItem,(IDispatch**)&pCallInfo);

pCallInfo->put_ContactNames(bsCaller);
pCallInfo->put_Subject(bsSubject);
pCallInfo->put_Body(bsBody);

pCallInfo->put_Type(bsType);

pCallInfo->Save();

Here my question is: i want to relate a contact to the journal item(which is
a phone call entry),but i cann't found any calls i can use to achieve this
goal,
any tips?
thanks in advance
 
K

Ken Slovak - [MVP - Outlook]

The Links collection is what you want to work with. That has an Add method
that takes a contact item. Once the Link is added you can see the journal
item linkage in the Activities tab of the contact item and the link to the
contact item in the journal item.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top