Following is the piece of code i got from this forum itself but stil i am not able to get the full details of recepients like location,office number.
plz help me to access that information..
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows. Forms;
using MAPI;
using System.Reflecti on;
using Outlook = Microsoft.Offic e.Interop.Outlo ok;
namespace Sample1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void Search_Click(ob ject sender, EventArgs e)
{
try
{
MAPI.SessionCla ss oSession = new MAPI.SessionCla ss();
oSession.Logon( "Gnana",
System.Reflecti on.Missing.Valu e, true, true,
System.Reflecti on.Missing.Valu e, false, System.Reflecti on.Missing.Valu e);
MAPI.Recipients oRecipients = null;
MAPI.Recipient oRecipient = null;
MAPI.AddressEnt ry oAddressEntry = null;
// Display dialog box to select recipient(s)
// Watch the wrapping on this next line, everything needs to be on one line.
oRecipients = (MAPI.Recipient s)oSession.Addr essBook(System. Reflection.Miss ing.Value,"Sele ct Name", true, true, -1, "", "", "", 0);
for(int i = 1; i <= (int)oRecipient s.Count; i++)
{
// Do what you need with Recipient, or AddressEntry
oRecipient = (MAPI.Recipient )oRecipients.ge t_Item(i);
// MAPI.AddressLis t oadd=(MAPI.Addr essList)oRecipi ents.
oAddressEntry = (MAPI.AddressEn try)oRecipient. AddressEntry;
MessageBox.Show (oRecipient.Add ress.ToString() );
MessageBox.Show (oAddressEntry. Name.ToString() );
}
oSession.Logoff ();
}
catch (Exception et)
{
MessageBox.Show (""+et);
}
}
}
}
0 1884 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Lauren Quantrell |
last post by:
I know if I was using an Access MDB I could link to MS Outlook folders
and the addressbook. But I'm using an Access Project (ADP) and want to
figure out a way to link to the Outlook addressbook this in code. I'm
hoping someone has an example of how to accomplish this, through CDO
or otherwise.
Thanks,
lq
|
by: Ecohouse |
last post by:
I need to be able to access an Outlook folder and read each email and
pull data from the email into tables in Access and move the email to
another folder.
I now about automation but am not sure exactly how to do it for
Outlook. Below is an example of an email that I need to pull the data
from:
DATE/TIME: 8/25/2005 1:57:15 PM
|
by: Serdar Kalaycý |
last post by:
Hi everybody,
My problem seems a bit clichè but I could not work around.
Well I read lots of MSDN papers and discussions, but my problem is a bit
different from them. When I tried to run the project in debug mode (by
hitting F5) it gives an error message
"Error while trying to run project: Unable to start debugging on the web
server.
|
by: Chris Fink |
last post by:
I have walked through all of the WSE 3 Hands on Labs and got everything
working fine. When I create my own certificate and install it in the stores,
my client application that is consuming my WSE enabled webservice receives
the following error (noted at the very bottom of this post).
My objective here is to create and secure a service application (webservice)
using an x509 test cert that requests a client certificate; and to create a...
|
by: Fabian Braennstroem |
last post by:
Hi,
I want to get access to my abook address file with python.
Does anyone have some python lines to achive this using
curses? If not, maybe anybody has small python program doing
it with a gui!?
Greetings!
Fabian
| |
by: Walshi |
last post by:
Hi all,
I'm a relative newby to access and VBA etc. My forms and tables etc are
working great and saving lots of time...However...
I have two databases with the exact same table format. I want db1 to be
used to input data by a remote operator, when she is ready I want her
to be able to click a control button to email her new data to db2. This
new data will be added to the table in db2 ready for further
processing.
|
by: hotelinfoline |
last post by:
I want to get outlook express (not microsoft outlook express) address
book address's in visual basic application. Please tell how I can get.
|
by: mkhan |
last post by:
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...
|
by: mkhan |
last post by:
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
| |
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |