Outlook 2000 VBA: Access to Contact -Inspector's note area

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

When I double-click on a contact in the Outlook Explorer the Outlook
Inspector open a window to display the contact details in a tab called
"General". At the bottom of that window there is an area to capture
notes / information related that specific contact.

My question: How can I access this area to add my own information from
VBA code.

Any idea?

Peter
 
It's the Body property.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



When I double-click on a contact in the Outlook Explorer the Outlook
Inspector open a window to display the contact details in a tab called
"General". At the bottom of that window there is an area to capture
notes / information related that specific contact.

My question: How can I access this area to add my own information from
VBA code.

Any idea?

Peter
 
Sue,

thank you for the fast reply, it solved my problem.

Just a sidenote for others:
The .Body property only works when applied to a contact opened in an
ActiveInspector window (which makes sense since the "body" area is
only visible in an Inspector window).
When applied to a contact in an ActiveExplorer window no error occures
but the "body" area does not get modified.

Peter
 
Huh? As long as you have a properly instantiated ContactItem, you can set
the Body property and then use Save to save it. If you're seeing other
behavior, show a code snippet that demonstrates the issue.
 
Sue, here you are.

**** Begin snippet ***

Dim obj_Contact As Outlook.ContactItem
Dim obj_Selection As Outlook.Selection
Dim i As Long
..
..
..
Set obj_Selection = Outlook.ActiveExplorer.Selection

For i = 1 To obj_Selection.Count
Set obj_Contact = obj_Selection.Item(i)

With obj_Contact
.GetInspector.Activate ' added to get it working
.Body = "This text added to selected contact" & vbCrLf & .Body
.GetInspector.Close (olSave) ' added to get it working
End With

Next i
**** End snippet ***

Peter
 
Back
Top