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

How to Read an Outlook Email

Hi!

I hate to bother you all with this, but I don't know how best to approach
a particular task.

Here's the deal:

Once a month I receive in my own inbox on my company's Outlook Exchange
email server an email from one of our vendors to which is attached a text
file (a comma-delimited data file containing the details of our monthly
billing. I then have to save that attachment to a folder in order to upload
the data into SQL Server.

My goal is to automate this process. Right now, I have to personally
download this attachment to a particular folder, and then execute a SQL
Server job that runs inserts the data into tables in our database.

What I"m hoping to do is be able to schedule the job so that it first opens
up my inbox ( or any specific inbox), looks for an email from this particular
email address, and then saves the attachment to a folder I specify. Then,
the rest of the job can run as usual.

I think a lot of companies receive data as email attachments, but I'm not
sure how they automate the process of opening up the email and then saving
those attachments to a folder.

Additionally, one company (UPS) sends us a link to our billing file rather
than attaching it. Each month I have to open the email, right mouse clidk,
and then save the linked file. Is there a way I can automate the process of
reading the email, locating the link within the text of the email, and then
saving the linked file to a selected folder?

Perhaps there's a utility or program out there, like some kind of VB.Net
control or program, that will help with this.

Any advice would be greatly appreciated. However, I've already read BOL and
I"m still cluelss. I'm absolutely certain, though, that other companies are
doing precisely what I need to be doing. I just don't know how they're doing
it.

Thanks!
Karen Grube
kl*****@yahoo.com

Nov 21 '05 #1
2 12404
Hi,

Here are some links to get you started.

Read mail from outlook
http://support.microsoft.com/?scid=kb;EN-US;313795

Screen Scraping
Add the following imports to top of file.
Imports System.Text

Imports System.Net
Sample code
'STEP 1: Create a WebClient instance

Dim wc As New WebClient

'STEP 2: Call the DownloadedData method

Const strURL As String = "http://msdn.microsoft.com/"

Dim aRequestedHTML() As Byte

aRequestedHTML = wc.DownloadData(strURL)

'STEP 3: Convert the Byte array into a String

Dim objUTF8 As New UTF8Encoding

Dim strRequestedHTML As String

strRequestedHTML = objUTF8.GetString(aRequestedHTML)

'step 4 save to html file

Dim fs As New System.IO.StreamWriter("C:\MSDNWebPage.html")

fs.WriteLine(strRequestedHTML)

fs.Close()

' step 5 display data

Process.Start("C:\msdnwebpage.html")

http://www.4guysfromrolla.com/webtech/070601-1.shtml

Ken

-----------------------

"Karen Grube" <Ka********@discussions.microsoft.com> wrote in message
news:BF**********************************@microsof t.com...
Hi!

I hate to bother you all with this, but I don't know how best to approach
a particular task.

Here's the deal:

Once a month I receive in my own inbox on my company's Outlook Exchange
email server an email from one of our vendors to which is attached a text
file (a comma-delimited data file containing the details of our monthly
billing. I then have to save that attachment to a folder in order to
upload
the data into SQL Server.

My goal is to automate this process. Right now, I have to personally
download this attachment to a particular folder, and then execute a SQL
Server job that runs inserts the data into tables in our database.

What I"m hoping to do is be able to schedule the job so that it first opens
up my inbox ( or any specific inbox), looks for an email from this
particular
email address, and then saves the attachment to a folder I specify. Then,
the rest of the job can run as usual.

I think a lot of companies receive data as email attachments, but I'm not
sure how they automate the process of opening up the email and then saving
those attachments to a folder.

Additionally, one company (UPS) sends us a link to our billing file rather
than attaching it. Each month I have to open the email, right mouse clidk,
and then save the linked file. Is there a way I can automate the process of
reading the email, locating the link within the text of the email, and then
saving the linked file to a selected folder?

Perhaps there's a utility or program out there, like some kind of VB.Net
control or program, that will help with this.

Any advice would be greatly appreciated. However, I've already read BOL and
I"m still cluelss. I'm absolutely certain, though, that other companies are
doing precisely what I need to be doing. I just don't know how they're
doing
it.

Thanks!
Karen Grube
kl*****@yahoo.com
Nov 21 '05 #2
"Karen Grube" <Ka********@discussions.microsoft.com> schrieb:
What I"m hoping to do is be able to schedule the job so that it first
opens
up my inbox ( or any specific inbox), looks for an email from this
particular
email address, and then saves the attachment to a folder I specify. Then,
the rest of the job can run as usual.


Support policy for Outlook APIs that are used in the .NET Framework
environment
<URL:http://support.microsoft.com/?scid=kb;EN-US;872895>

How to use the Microsoft Outlook Object Library to retrieve a message from
the Inbox by using Visual C# .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;310258>

HOW TO: Retrieve Unread Messages from Inbox by Using Outlook Object Model in
Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;313795>

How to retrieve specific messages using the Find method and the Restrict
method in Visual C# .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;310265>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

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

Similar topics

3
by: Chuck Farah | last post by:
I am unsuccessfullly trying to display an outlook email from a vb web forms (.net) outlook 2002 #1. is it possible to use outlook client email from a web form using the outlook object model...
1
by: Karen Grube | last post by:
Hi! I hate to bother you all with this, but I don't know how best to approach a particular task. Here's the deal: Once a month I personally (that is, in my own personal inbox on my...
1
by: Karen Grube | last post by:
Hi! I hate to bother you all with this, but I don't know how best to approach a particular task. Here's the deal: Once a month I personally (that is, in my own personal inbox on my...
1
by: joshua | last post by:
Is there a way to set the FROM name (the name the recepient sees as the one who sent the email) when using Access to create an Outlook email message? (Using MS-Office 2000 SP3) We set up an...
4
by: Ecohouse | last post by:
I need to be able to access an Outlook folder and read each email and pull data from the email into tables in Access and move the email to another folder. I now about automation but am not sure...
1
by: W Akthar | last post by:
Hi, Can anyone point the way to some examples which show you how to read Outlook email items in C# ? I need to be able to read Outlook items stored in a folder. Cheers
0
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...
6
by: c_shah | last post by:
how to save outlook email attachments using VB.net?
5
by: xin.yadong | last post by:
Is there a way to create an New Outlook Email from an ASP.NET application? I can not use "mailto:", since it is only support a string less than 512. I have find a good way from link :...
1
by: senthil3d | last post by:
Hi, I have a requirement that an html report is sent using outlook. This report is embedded in the outlook email. The problem Im facing is I've included some javascript functionalities within the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...

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.