sending e-mail with Outlook

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

HI!!

My question is not about how to send e-mails with Outlook,
but about the address book its self.

Here's what I mean!

I would like to press a command button on my form that
would call the Window of Outlook when we Press the 'To'.

I would like to see the list of all the name of my contacts
in Outlook, the same way its done when we use the 'Outlook'
window pop-up for that same task.

If its possible,I would also like to know if I can capture
in a variable the To,the CC and the BCC and in turn, use
does variables inside my 'Send code'...

I just want to be able to open my Address book,select
the 'To' or the 'CC' and/or the 'BCC' and copy that info to
some variables and used them after in my code.

Is this possible....

If not,any Idea on how to proceed?

Patrick
 
I use the following code in my VB6 application to obtain the names and
eMail address of all users in the Outlook Contact folder:

Dim olApp As Object
Dim olNs As Object
Dim Fldr As Object
Dim olCi As Object
Dim sWork As String
Set olApp = CreateObject("Outlook.Application")
Set olNs = olApp.GetNamespace("MAPI")
Set Fldr = olNs.Folders("Personal Folders").Folders("Contacts")
For Each olCi In Fldr.Items
If olCi.Email1Address <> "" Then
sWork = olCi.FirstName & " " & olCi.LastName
lstOfContacts.AddItem sWork & vbTab & olCi.Email1Address
End If
Next olCi
Set olCi = Nothing
Set Fldr = Nothing
Set olNs = Nothing
Set olApp = Nothing

Hope this helps.....
 
Back
Top