A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Want e-mail addresses from items in my inbox



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 23rd 09, 09:09 PM posted to microsoft.public.outlook.program_vba
Stanley
external usenet poster
 
Posts: 7
Default Want e-mail addresses from items in my inbox

I have the following code:
Private Sub myOlApp_InboxItems()
Dim myOlApp As Outlook.Application
Dim myfolder As Outlook.MAPIFolder
Dim myitems As Items
Dim mynamespace As NameSpace
Dim n As Integer
Set myOlApp = CreateObject("Outlook.Application")
Set mynamespace = myOlApp.GetNamespace("MAPI")
Set myfolder = mynamespace.GetDefaultFolder(olFolderInbox)
Set myitems = myfolder.Items
MsgBox myitems.Count
n = 1
MsgBox myitems(n) 'this gives me the subject of the 1st e-mail in my inbox
End Sub
From this I can loop and see the subject of each e-mail in my inbox. What I
would like to see is the e-mail address of the sender and the date it was
sent.
Any ideas how I can code this?
Thanks,
Stanley
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
add multiple addresses from inbox to contacts tee_sk Outlook - Using Contacts 1 May 19th 09 10:37 AM
EXTRACTING EMAIL ADDRESSES FROM INBOX Gaby Huut Bay Outlook - Using Contacts 1 June 26th 08 07:57 PM
Two e-mail addresses in Inbox Allan Outlook Express 3 December 19th 07 11:52 PM
Inbox displays new mail message but nothing new appears in Inbox 4sh Outlook - Installation 0 April 5th 07 02:24 PM
Inbox, Sent Items & Outbox in Deleted Items in Outlook 2003 & OWA with Exchange splounx Outlook - General Queries 1 February 17th 06 02:22 AM


All times are GMT +1. The time now is 05:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.