473,473 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to save an attached file of Outlook into a specific location

Hi,

I receive daily an email with a attached file from my Outlook inbox. This
file must be saved into a specific location manually. I made an app to
automate this process.

My app can read the emails from the inbox folder, I can catch all properties
of the emails. I want to know how to save the attached file into a specific
location.

Anyone can give a help?

Thanks in advance
Nov 21 '05 #1
1 1395
I found the below codes work for me:
Dim oAttachs As Ol.Attachments = oMsg.Attachments
Dim oAttach As Ol.Attachment
Debug.WriteLine("ATTACHED FILE: " &
oAttachs.Count)

If oAttachs.Count > 0 Then
For Each oAttach In oAttachs
'Dim file As New
System.IO.StreamWriter("c:\temp\mt940_test.txt", True)
Try

oAttach.SaveAsFile("c:\temp\mt940_test.txt")
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try

'file.WriteLine(oAttach.DisplayName)
'file.Close()
Next
End If

"Li Pang" wrote:
Hi,

I receive daily an email with a attached file from my Outlook inbox. This
file must be saved into a specific location manually. I made an app to
automate this process.

My app can read the emails from the inbox folder, I can catch all properties
of the emails. I want to know how to save the attached file into a specific
location.

Anyone can give a help?

Thanks in advance

Nov 21 '05 #2

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

Similar topics

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...
3
by: 00steve | last post by:
Hi, I was wondering if anyone knew how to go about having a "save as HTML" option incorporated within a page. (I know the option is available from the file menu from within IE, but a client has...
2
by: Steve | last post by:
How do you programatically save files that are attached to an email to a specified folder? It could be one file or multiple files attached to the email. Can it be done if Outlook Express is being...
0
by: fish | last post by:
Hi, I have a VB.net application that will save attachments to a directory on my local pc. I need to run this component on our exchange 2003 server and also save the attachments to a local DIR. ...
0
by: AA | last post by:
I’m trying to get the path and name of an attached file in to email message in Outlook using the Clipboard. The idea is …. IDataObject data = Clipboard.GetDataObject(); String...
1
by: xian2 | last post by:
Hi All, I have been using this guide http://www.compasscomputing.co.uk/code/AcceesReportsToPDFandEmail.htm to create a command button that automatically saves and e-mails your report and have...
0
by: blackjackkiller | last post by:
Hi Need help in automating the report.Let me give the explanation what i need that might help u in understanding it. 1 need excel macro to run a query to pull data from sql server for specific...
3
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right...
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
0
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,...
0
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...
1
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
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,...
1
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...
0
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...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.