473,698 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

opening 'To' contact list in address book of a mail message in outlook using vb.net

2 New Member
Hi, i have been having trouble how to open the To Contacts list (address book) of a mail message in outlook using vb.net from where the user would be able to select a 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.Recipie nt


objSession = CreateObject("M API.Session")



objSession.Logo n("", "", False, False)
''objRecipients = objSession.addr essbook( _
'' Title:="Select Contact Person", _
'' oneaddress:=Tru e, _
'' Forceresolution :=True, _
'' reciplists:=0)

objRecipients = objSession.addr essbook



Try
'MsgBox(objReci pients(1), vbOKOnly, "Selected Name")
'' MsgBox(objRecip ients, MsgBoxStyle.OKO nly, "Selected Name")

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

objSession.Logo ff()
objSession = Nothing
objRecipients = Nothing


End Function
Aug 22 '07 #1
0 2044

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

Similar topics

0
3979
by: Bob Avallone | last post by:
MetaPro Systems Inc. Visual Studio Dot Net Tips & Tricks #3 – Direct Access to Your Outlook Address Book. Project Type: VS.NET Windows Application Code Behind: Visual Basic I have a project where I needed to access my Outlook Address book directly. This is possible but very tricky. I got it to work and I would like to share it with you. Thanks go to Jim Lennox of Scientific
5
3649
by: TM | last post by:
I would like to write a little app in Visual Basic .net as an add-in to Outlook 2003 so that I can quickly get a list of contact names and email addresses, then when I click on a name or email address, I want to open a new mail message to that person. I don't want to send the message, just open a new blank email so that I can make it easier to send messages. Any idea how I could find out more about how to do this ?
1
4342
by: charliej2001 | last post by:
Hi all My access database has import/export capabiltiy of contact details between outlook. The database is getting big now (1000+ contacts) and so are the outlook address books that have the contacts info in them. When I export contacts from access to outlook, it takes a long time because there are so many contacts in the Outlook address book, and it is checking all of these against the contacts coming in, so as to avoid duplicates....
1
4586
by: Phil Stanton | last post by:
I have a Yacht Club Db with names addresse phone nos, emails etc. I want to export them to Outlook. No problem in getting them into the contact folder. My problem is I have a folder within the contact folder called "Yacht Club" How do I change the "active folder" from Contacts to "Yacht Club" Existing code here:
4
13935
by: Alexander Szigetvary | last post by:
Hi NG! Is there a way to open the Outlook address book dialog (as in Outlook) using C#? I am using Outlook 2003 (MS Outlook 11.0 Object Library). In Outlook 2007 it can be done with SenderNameDialog. I need to support both versions. Any hints? TIA
1
2881
by: Lpitt56 | last post by:
I am running MS Access 2007 and I want to update an Outlook Address book from my Access Database. I started out by importing the Outlook Address Book as a linked table and it linked fine. I then built a query to filter a master contact list of contacts and I made it an append query to added to the linked Outlook address book table. However, I am getting an error message that says I do not have the necessary permissions to use this object. At...
1
5581
by: Paul Brady | last post by:
This must be a common operation, but I have searched this newsgroup and have wrestled with the help messages, and I seem to need help with this simple task. I have an Access 2000 database which, via a query, can generate a list of e-mail addresses. I can export this list, if necessary. There may be hundreds of names in this list. Now, I want to send e-mail to everyone on this list. I can copy the list onto the clipboard (all 300...
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8862
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7729
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6521
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.