473,388 Members | 1,327 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,388 software developers and data experts.

Outlook Program

Dan
I need to access a user's inbox and extract attachments off of new messages.
I have connected up to my Inbox and can see my messages, but I need to
navigate to another user's inbox. Any help would be appreciated. Here's some
of the code I'm using:

// Get items in my inbox.
Application outLookApp = new Application();
NameSpace outlookNS = outLookApp.GetNamespace("MAPI");
MAPIFolder inboxFolder =
outlookNS.GetDefaultFolder(OlDefaultFolders.olFold erInbox);

// Print out basic info.
Console.WriteLine("You have {0} e-mails.", inboxFolder.Items.Count);
Console.WriteLine();
foreach (object obj in inboxFolder.Items)
{
MailItem item = obj as MailItem;
if (item != null)
{
Console.WriteLine("-Received: {0}", item.ReceivedTime.ToString());
Console.WriteLine("-Sender: {0}", item.SenderName);
Console.WriteLine("NBR ATTACHMENTS: {0}", item.Attachments.Count);
Console.WriteLine();
Console.ReadLine();
}
}
Oct 2 '06 #1
0 982

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in...
3
by: Paul | last post by:
Hello, I am trying to set up a program that will email me when a process has been completed by a user. The user uses a program that moves some files, after these files are moved I want the...
3
by: Chris Thunell | last post by:
I am using vb.net to access a public folder in Outlook / Exchange Server. Whenever my program tries to access this folder i get a dialogue box saying "A Program is trying to access Outlook. Do you...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
5
by: John A. Bailo | last post by:
I have a program that I'm converting from Outlook 2000 to Outlook 2003. It basically opens Outlook and iterates through a series of items in a public folder. I was able to run this as a...
3
by: tshad | last post by:
I have a program that is reading one of my mailboxes. It is polling the mailboxes ever 5 minutes to see if there is a message or not. Is this how Outlook does it (using Exchange as the...
3
by: Chet | last post by:
I am writing an application that utilizes a reference to Microsoft Outlook. (Added a reference to the MS Outlook COM interface to my project). I then write code such as: dim olApp as new...
5
by: fniles | last post by:
I am using VB.NET 2005. I created a project using the Microsoft Outlook 8.0 Object Library (Object Model) in my previous machine. Now that I have a new machine, when I try to compile that program...
2
by: Ryan H | last post by:
I made a program that reads emails from an Outlook mailbox and does some stuff and the program works fine. However, my boss now tells me that the program is to be executed from a remote computer....
4
by: musicloverlch | last post by:
Hi all, I have a database being used by 30 people and is split between the backend and frontend. The database has the ability to send e-mails through Outlook and I have even put Redemption on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
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...
0
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...

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.