473,382 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Display outlook 'Select Names' (any VB gurus here?)

2
Hi, i have been having trouble how to open the 'To' Contacts list(Cc or To) (address book) of a mail message in outlook using vb.net from where the user would be able to select an email address and would be pulled and stored in our database for later use in the application. I have searched on the internet for it and all that i would find is code that would open up the contacts list, which i dont need. i have been having trouble with finding this code. other than that i have this code which actually opens it up, but im not able to store the selected item. if someone could either let me know what to do with the code i have, to get the selected item or show me a different way to come across this problem.
Thank You.

This is the code i have:

Public Shared Function Test1() As String
Dim objSession As Object
''Dim objSession As
Dim objRecipients As Object
Dim strEntryID As String
Dim strStoreID As String
Dim ss As Outlook.Recipient


objSession = CreateObject("MAPI.Session")



objSession.Logon("", "", False, False)
''objRecipients = objSession.addressbook( _
'' Title:="Select Contact Person", _
'' oneaddress:=True, _
'' Forceresolution:=True, _
'' reciplists:=0)

objRecipients = objSession.addressbook



Try
'MsgBox(objRecipients(1), vbOKOnly, "Selected Name")
'' MsgBox(objRecipients, MsgBoxStyle.OKOnly, "Selected Name")

ss = objRecipients(1)
Catch e As Exception
MessageBox.Show(e.Message)
End Try

objSession.Logoff()
objSession = Nothing
objRecipients = Nothing


End Function
Aug 22 '07 #1
0 1241

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: DavidS | last post by:
I have HTML web page with <asp:Image id=img_L runat=server ImageAlign=Top Visible=True Width=y Height=x></asp:Image>. For some images, less than 128K I can view image. Other image files > 128K,...
0
by: brbxx99x | last post by:
Hi, I'm just wondering how I can display the outlook address list (the screen that is displayed when one clicks on either the TO, CC or BCC buttons) and retrieve the email addresses that the user...
2
by: Arnold | last post by:
Greetings Gurus, In a report showing the names of students and their progress, I am getting an error in the name field (Name: #Error). The report gets its data from an unbound form containing...
3
by: Jeff Waskiewicz | last post by:
Hello, I think the subject says it all I am trying to return a list of domain names to later display in a combobox. I found a number of VB6 samples that show how to do this using the...
5
by: raymonj | last post by:
Hi, Is it possible to display the Outlook recipient window from Vb.Net and receive the email selection the user has chosen when the window is closed ? Thanks folks.
1
by: Soumya v s | last post by:
i wants to display all table names in the combo box with php and mysql
5
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
On Jun 3, 3:23 am, Jesse Ziser <d...@spam.diewrote: The relevant paragraph from the Standard is: ---- Begin Quote ---- The type declared is va_list which is an object type suitable for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.