How to refer to contact details

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to create a VBA script that sends the current contact's info to
word formatted for diferent tasks. How do I set a variable with the current
contact's field info (Outlook 2003)

IE;
dim myFirstname as string
myFirstname = currentlyselectedOutlookContact.FirstName
Msgbox "the contact's name is: " & myFirstName

Paul
 
Am Wed, 23 Nov 2005 19:05:05 -0800 schrieb FunnyJuggler:

For items, select in an Explorer, I´d use this:

Dim obj as object
Dim oContact as OUtlook.ContactItem
Dim oExpl as Outlook.Explorer
Set oExpl=Application.ActiveExplorer
If oExpl.Count then
Set obj=oExpl.Selection(1)
If TypeOf obj is Outlook.ContactItem Then
Set oContact=obj
' now you can read oContact.FirstName
Endif
Endif
 
Back
Top