473,406 Members | 2,371 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,406 software developers and data experts.

Reading Outlook

Hello All,
I'm trying to read my Outlook Inbox and add email addresses to an Access
table. My code is below. It works fine except there doesn't seem to be a
mailobject property for the senders email address. Can anyone help?
Fred Zuckerman
Private Sub btnScanInbox_Click()
Dim rst As DAO.Recordset
Dim OlApp As Outlook.Application
Dim Inbox As Outlook.MAPIFolder
Dim InboxItems As Outlook.Items
Dim Mailobject As Object

Set rst = CurrentDb.OpenRecordset("tblAddresses")
Set OlApp = CreateObject("Outlook.Application")
Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFold erInbox)
Set InboxItems = Inbox.Items
For Each Mailobject In InboxItems
If InStr(Mailobject.Subject, "SUBSCRIBE") 0 Then
rst.AddNew

'this line doesn't work
rst!SenderAddress = Mailobject.SenderAddress

rst!SenderName = Mailobject.SenderName
rst!AddDate = Date
rst.Update
End If
Next

rst.Close
Set rst = Nothing
Set OlApp = Nothing
Set Inbox = Nothing
Set InboxItems = Nothing
Set Mailobject = Nothing
End Sub
Oct 19 '07 #1
0 1398

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

Similar topics

5
by: PIII450 | last post by:
Hi all, Does anyone know of a class which will read outlook email messages. I need to be able to scan outlook for "non-read" e-mails with a specific subject and then save the attachments and...
0
by: pcouas | last post by:
Hi, Anyone know how reading Outlook or Outlook express contact File from Javamail ? It seems theses files are named .dbx and .vba Thanks Philippe
6
by: dave | last post by:
I am looking for code resources on how to read ms exchange calendar with vb.net. Can anyone point me in the right direction to some code samples thx
23
by: Graham F French | last post by:
Hello, I can read text files into my application, but I cannot read in msg files as they seem to be in a proprietry format. Is there anyway of converting it on the fly or is there an...
4
by: ethan220 | last post by:
Is it possible to read Outlook mails in PHP?? I would like to create a php program that reads mails from a particular person which are downloaded in MS Outlook. Ethan
7
by: Dmitry Akselrod | last post by:
Hello everyone, I am attempting to extract some header information from typical Microsoft Outlook MSG files in VB.NET. I am not after a complete message or attachments that may be enclosed. I...
0
by: AMP | last post by:
On running the followig code, with a time that fires every 30 seconds Dim oApp As Outlook.Application = New Outlook.Application ' String used for comparison with mail item. ' Get Mapi NameSpace....
3
by: hamster | last post by:
Hi there im writing a program that has to read email from outlook. does anyone know how? I managed to read all the subjects in my inbox but i'd like to read the 1st 1 in the inbox. here's the code...
0
by: Roman Optio | last post by:
Hi, I am currently working on a tool to transfer addressbook data such as contacts and organizations between Vondle and Outlook. For those of you who are wondering what Vondle is, it is an...
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: 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...
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...
0
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...
0
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,...
0
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...

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.