Windows Develop Bookmark and Share   
 index > Windows Forms General > open outlook adress book
 

open outlook adress book

in a form in windows application

i kept email to text box but for the adress in it i kept on button beside it when i click on the button it should open the adress book of the user

i want to email all the email ids in my adress book

i dont know how to open the adress book of outlook when i click on a button

and add theemail id'sin the textbox

Rajesh batchu  Friday, October 13, 2006 12:51 PM

Private Sub DisadressBook()

On Error GoTo ErrMsg

app = New Outlook.Application

nameSpace_Renamed = app.GetNamespace("Mapi")

Call GetAddressBook()

Exit Sub

ErrMsg:

MsgBox("Couldn't access outlook object")

End Sub

Private Sub GetAddressBook()

Dim i As Object

Dim AddLists As Outlook.AddressLists

AddLists = nameSpace_Renamed.AddressLists

cboAddress.Items.Clear()

For i = 1 To AddLists.Count

cboAddress.Items.Add(AddLists.Item(i).Name)

Next i

End Sub

the above 2 methods can be used to access adressbook of outlook

Rajesh batchu  Friday, March 02, 2007 7:19 AM

Look at this link - http://www.microeye.com/resources/res_outlookvsnet.htm

You might get a solution to what you are looking for (and more)

SRIRAM RAJAMANURI  Friday, October 13, 2006 1:32 PM

Private Sub DisadressBook()

On Error GoTo ErrMsg

app = New Outlook.Application

nameSpace_Renamed = app.GetNamespace("Mapi")

Call GetAddressBook()

Exit Sub

ErrMsg:

MsgBox("Couldn't access outlook object")

End Sub

Private Sub GetAddressBook()

Dim i As Object

Dim AddLists As Outlook.AddressLists

AddLists = nameSpace_Renamed.AddressLists

cboAddress.Items.Clear()

For i = 1 To AddLists.Count

cboAddress.Items.Add(AddLists.Item(i).Name)

Next i

End Sub

the above 2 methods can be used to access adressbook of outlook

Rajesh batchu  Friday, March 02, 2007 7:19 AM

You can use google to search for other answers

Custom Search

More Threads

• Disabling child window titlebar using User32.dll C#
• Winforms beginner(msn notification alert)
• Loop in Windows Media Player control
• checking primary key @ user input
• Applying window styles to controls at runtime
• usercontrol and form.controls
• Windows Service Application - Timer Issue
• Tab button
• Float TextBox
• TextBox Input