spoowiz
asked on
Recommend book please. Outlook programming with Visual Basic.
Hi,
Can you recommend your favorite book on how to learn about Outlook programming with Visual Basic - like adding to contact from VB or looking up info in contacts from VB.
Thank you,
Phil
Can you recommend your favorite book on how to learn about Outlook programming with Visual Basic - like adding to contact from VB or looking up info in contacts from VB.
Thank you,
Phil
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks ryancys. however, i'm looking for a book to learn, not only those examples but more.
p.s. the 2nd code will display items in Contacts but not in sub-folders like "hot contacts" under "contacts".
p.s. the 2nd code will display items in Contacts but not in sub-folders like "hot contacts" under "contacts".
Try like:
...
Set myFolder = mynamespace.GetDefaultFold er(olFolde rContacts)
For j = 1 To myFolder.Folders.Count
Set myFolder = myFolder.Folders(j)
For i = 1 To myFolder.Items.Count
Set myitem = myFolder.Items(i)
Debug.Print myFolder.Name & "> " & myitem.FullName & ": " & myitem.Email1Address
Next i
Next j
...
...
Set myFolder = mynamespace.GetDefaultFold
For j = 1 To myFolder.Folders.Count
Set myFolder = myFolder.Folders(j)
For i = 1 To myFolder.Items.Count
Set myitem = myFolder.Items(i)
Debug.Print myFolder.Name & "> " & myitem.FullName & ": " & myitem.Email1Address
Next i
Next j
...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm closing this question out. Thanks both of you.
I decided on "Developing Applications using Outlook 2000, CDO, Exchange, and Visual Basic..." from amazon.
ryan, you didn't recommend a book but learned from your code so awarding points also.
I decided on "Developing Applications using Outlook 2000, CDO, Exchange, and Visual Basic..." from amazon.
ryan, you didn't recommend a book but learned from your code so awarding points also.
Private Sub cmdGetContact_Click()
Dim myolApp As Outlook.Application
Dim mynamespace As Outlook.NameSpace
Dim myitem As Outlook.ContactItem
Dim myFolder As Outlook.MAPIFolder
Set myolApp = CreateObject("Outlook.Appl
Set mynamespace = myolApp.GetNamespace("MAPI
Set myFolder = mynamespace.GetDefaultFold
Debug.Print "Contacts count = " & myFolder.Items.Count
For i = 1 To myFolder.Items.Count
Set myitem = myFolder.Items(i)
Debug.Print myitem.FullName & ": " & myitem.Email1Address
Next i
Set myitem = Nothing
Set mynamespace = Nothing
Set myFolder = Nothing
Set myolApp = Nothing
End Sub