473,770 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing an Outlook Email (Body) into Access DB

Boxcar74
42 New Member
I think this is a little crazy but I supposed to figure out how to get the body of an email message (Outlook) into an Access DB table, with little to no effort :)

Here is the deal I receive email with the results from an online survey and I need to get the data into Access for reporting proposes.

-------------------------------------
I can get it in Access with a copy/ paste to Excel the use “Text to Columns” Then “Pate Special”/ “Transpose” to get the data into the fight format, and then save as a csv then import to Access. Obviously not the best way

I got the table set up with the appropriate fields.
Also a I have folder from my Inbox linked to Access, a make table query to only have the Body of the email in the table.

But I see no way to Link them or make the Outlook data (from the body of the message) useful.

Even with Export from Outlook to a csv, excel, or text files doesn’t come out right.

Here is a sample of the BODY of the email. The text before the “:” are the Column headings and the f’s and Strongly Agree are the records

training_class_ on: ffffffff
like_about_job: ff
change_one_thin g: fffffffffffffff fffffffff
changes_communi cated: Strongly Agree
changes_communi cated_memo: fffffffffff
tech_skill_need ed: Strongly Agree
have_skill_know ledge_memo: ffff

Really I want know if it is possible to use the linked table from the Outlook to add the survey results to my table.

Honestly I don't think it will work so if you have any suggestions please I'm take any. !!!!

Any info would be great.
Jun 4 '07 #1
9 12221
Boxcar74
42 New Member
Ok, after searching and looking every where for an answer, I could be wrong but it seems the linked inbox table is really only design to work so Access can manipulate Outlook.

So it seems that barring a third party software VB or vba is required to do what I want.

I found two helpful posts on Scripts.

Retrieve Information from Outlook
www.thescripts. com/forum/thread583167-Outlook+Access. html

Application Automation
www.thescripts. com/forum/thread600219.ht ml
Since my vb is very limited I’m looking to two other options. Not really related to Access.
If I find a way relevant to this Post I’ll post it.

If anyone has any other Ideas please let me know.

-- Boxcar
Jun 6 '07 #2
cyberdwarf
218 Recognized Expert New Member
Hi Boxcar

AFAIK, the only way to do what you want is to create and manipulate an Outlook object within your Access code.

Do you want any further info?

Steve
Jun 6 '07 #3
Boxcar74
42 New Member
SURE !!!

Any info would be great!!!

My VB in limited, but if you could start me in the right direction I'd appreciate.
it.

Thanks
Jun 6 '07 #4
cyberdwarf
218 Recognized Expert New Member
OK, first have a look at one of today's threads called "Access - Outlook Run Time Error".

That should tell you whether your coding is up to it. Then post any further questions either on the same thread, or to this one.

Steve
Jun 6 '07 #5
Boxcar74
42 New Member
I look at that one earlier.

It is above my head, but i think i can tinker with it.

I did some VB 6 in college but it’s been a while and I've never used it in Access aside from simple macro’s and event procedures.

I put in a VBA module (in Access) and sadly I get an error "Compile Error: User-defined type not defined" on the 1st line --- Dim Olapp As Outlook.Applica tion.

Did I put the code in the right place “module1”? Could my version of Outlook affect it (2003)? Or did I just do it wrong?

My main concern is that the data needs to be transposed and I'm sure that code is much more complicated.

I don’t think this is something I can do YET, I want to learn how but I think I need to crack the old VB books.

BTW - is there or why isn’t there a data mapping feature in Access, beside the import wizard?

-Boxcar
Jun 6 '07 #6
cyberdwarf
218 Recognized Expert New Member
I look at that one earlier.
It is above my head, but i think i can tinker with it.
I did some VB 6 in college but it’s been a while and I've never used it in Access aside from simple macro’s and event procedures.
I put in a VBA module (in Access) and sadly I get an error "Compile Error: User-defined type not defined" on the 1st line --- Dim Olapp As Outlook.Applica tion.

Did I put the code in the right place “module1”? Could my version of Outlook affect it (2003)? Or did I just do it wrong?

My main concern is that the data needs to be transposed and I'm sure that code is much more complicated.

I don’t think this is something I can do YET, I want to learn how but I think I need to crack the old VB books.

BTW - is there or why isn’t there a data mapping feature in Access, beside the import wizard?
  1. Make sure you set a reference to MS Office in you VBA module
  2. Have a very close look at the OutLook methods and properties available in the object model;
  3. If you just want to transfer basic details (from/to/msg body, etc) it's not very complicated;
  4. Google "Outlook automation vb" and see what turns up ;-)
HTH
Steve
Jun 6 '07 #7
johngen
4 New Member
Try this software:
http://www.geniusconne ct.com/

(free version limited to 49 records)
Jun 8 '07 #8
Boxcar74
42 New Member
Update: I found a way to make it work for me.
So I figured I’d post the info, if someone else finds themselves in a similar situation.

I didn’t solve the issue the VB(A) way or with that software, though it looks good.

The web page that the survey form is on was created using FrontPage.

When I realized this I know FrontPage can save data to Excel, excel would provide me a much easier import.

But after a quick search I found that FrontPage will create an Access DB for the form.

Info
http://support.microsoft.com/kb/q233406/
Easy Directions
http://www.csbsju.edu/itservices/kno...todatabase.htm


SO, I’m simply going to link the table from the FrontPage/Access DB to my Access DB.


I’m not a big fan of FrontPage (too much MS extra code) but in this instance it made my life much easier. I’m pretty sure that most web development programs can do this as well and if you are good at html you can probably figure it out.

I hope this can help anyone!!


- Boxcar
Jun 8 '07 #9
Boxcar74
42 New Member
UPDATE 2
The Powers that be didn't allow a Access DB on that server.
So I found the right way. With VBA and a GetWordCS.

In a module add the code: (this is for Comma's)
Public Function GetCSWord(ByVal s, Indx As Integer, Optional strdelimiter = ",")
'Returns the nth word in a specific field
On Error Resume Next
GetCSWord = Split(s, strdelimiter)(I ndx - 1)
End Function


Then this is the query
field2: GetCSWord([Body],1)

Field2 is The Coulmn Heading and GetCSWord([Body],1) Is the first word in the body of the email.

Example
So if the date (month, Day, Year) are the 3,4,5 words of the Body: Use

Date: GetCSWord([Body],3) & "/" & GetCSWord([Body],4) & "/" & GetCSWord([Body],5)


-- Boxcar
Jun 12 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2752
by: PitchBlackSheep | last post by:
I have an office of Real Estate agents who use our (single) Access 2000 database to keep track of clients. Our agents email our clients everyday using Outlook 2000. I'm trying to find a way to have those emails associated with the client's record. Any ideas? All I need is a nudge in the right direction ;) Thank you in advance!!!
0
2149
by: VP | last post by:
g'day, i am posting a problem i have encountered with creating an email using outlook through some basic c# code. the problem arises when using different email editors in outlook. At the moment i am using outlook 2000. Outlook can be configured to use the default outlook email editor or use ms word as the email editor in outlook. The sample code below simply creates an email with a hyperlink. The problem I am facing is that when...
8
16957
by: Wayne | last post by:
My supervisor performs the following steps to generate an email notifying recipients of new problem reports: 1) Generate an Access report containing the columnar data and export it to a .rtf file. 2) Using Word, convert the columnar data in the .rtf file to table. 3) Copy the table from Word and paste it in a new Outlook email (default format is RTF). I created a command button in the Access application which opens a new
1
5956
by: Mr T | last post by:
I know how to send email from Access and I know how to create a custom form in Outlook. but.... How do I put the email info from Access into the Outlook custom form ??? Dim MyDB As Database Dim MyRS As Recordset Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim objOutlookAttach As Outlook.Attachment
3
10651
by: Jeff | last post by:
I am trying to send emails from my application (not using a plugin, that will come later), I can create an email and add attachments. I can fill in the body etc. Word works for the editor. So mostly what I want. My issue is I would like to retain the signature block that exists when I insert my body into the message. Any help would be appreciated. Here is the code I am using: //Initialize the envelope values. string strTo =...
16
6200
by: Kosmos | last post by:
Good afternoon everyone, just wondering if anyone knew if it's possible to send meetings or appointments through email when you run VBA or SQL code in Access 2003? The following is the code I've been using which sends If you want to see the above code in its full context you can see it here: http://www.thescripts.com/forum/thread581521.html Willakawill helped me out a bit with getting access to remember if it had already added the...
5
5365
by: Kosmos | last post by:
I have traveled the world and the seven seas and I have yet to come up with an answer to this question.... So I'm adding an attachment to an email from access... The following is the code: and from here I go to the end (because the other part is in an If statement and that's in a loop...once the loop's finished, I've gathered the necessary information I would paste the full function but I already have in another place on this site and...
6
3671
by: LeoK | last post by:
Hey I am so close from finishing this database I just need one more issue solve thanks. Basically I have a code within a form that opens up outlook and fill in the body of the email, among other informations, with event infos, but I need it to also fill in the Venue. The problems is the venue exist in the form as a subform, and I don't know how to reference it in the code. Here is the code I hope you can help, I ran into so much problems trying...
6
10640
by: dlblack | last post by:
I am using the following code to send emails with attachments from Access using Outlook. The code works fine if Outlook is already open and emails are sent as expected via Outlook. When Outlook is closed, data is saved to the database but the email is not sent. Here is the the code. If anyone has suggestions on how I can get Outlook to open before trying to send the email I would appreciate it. Private Sub Approve_Click() On Error GoTo...
0
9595
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
9432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10232
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
10059
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 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...
1
10008
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,...
0
9873
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...
1
7420
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 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...
0
5454
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3974
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 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.