How to add a contact to a journal item?

  • Thread starter Thread starter ringerxyz
  • Start date Start date
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
 
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.
 
Back
Top