473,804 Members | 3,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Cl ick()
Dim rst As DAO.Recordset
Dim OlApp As Outlook.Applica tion
Dim Inbox As Outlook.MAPIFol der
Dim InboxItems As Outlook.Items
Dim Mailobject As Object

Set rst = CurrentDb.OpenR ecordset("tblAd dresses")
Set OlApp = CreateObject("O utlook.Applicat ion")
Set Inbox = OlApp.GetNamesp ace("Mapi").Get DefaultFolder(o lFolderInbox)
Set InboxItems = Inbox.Items
For Each Mailobject In InboxItems
If InStr(Mailobjec t.Subject, "SUBSCRIBE" ) 0 Then
rst.AddNew

'this line doesn't work
rst!SenderAddre ss = Mailobject.Send erAddress

rst!SenderName = Mailobject.Send erName
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 1422

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

Similar topics

5
6102
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 mark the e-mail as "read". I tried working with the am outlook application COM object but could not get it to work. If you have another way to do what I want, without human intervention, I'm open for suggestions. I't goes without saying I want to...
0
2133
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
953
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
25501
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 interpretation method? Thanks
4
2025
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
5047
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 am particularly interested in the Message ID field. I have examined MSG files in notepad and hex editors. I can see that the Internet Headers are there and present. I can do a search for Message-ID and locate it without any problems in notepad....
0
1199
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. Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI") oNS.Logon("USER", "password", False, True) ' Get Messages collection of Inbox. Dim oInbox As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
3
1688
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 i used to read the subjects.. Outlook.Application app = new Outlook.ApplicationClass(); Outlook.NameSpace NS = app.GetNamespace("MAPI"); Outlook.MAPIFolder inboxFld = NS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox); ...
0
2277
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 online project management toolkit used to support large engineering projects. More information on Vondle can be found at http://www.bricsys.com/vondle/ . The purpose of the tool is to fluently transfer addressbook data between vondle & outlook. I've...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10577
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...
0
10077
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
9150
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...
0
6853
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
5521
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
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
2
3820
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.