473,804 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
+ 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 1425
I found the below codes work for me:
Dim oAttachs As Ol.Attachments = oMsg.Attachment s
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.Strea mWriter("c:\tem p\mt940_test.tx t", True)
Try

oAttach.SaveAsF ile("c:\temp\mt 940_test.txt")
Catch ex As Exception
MsgBox(ex.Messa ge.ToString)
End Try

'file.WriteLine (oAttach.Displa yName)
'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
669
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 company's email server) receive 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
3
11637
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 requested that a button be used instead) Does anyone know how to go about accomplishing this? The possibility of IE specific code is available, as IE 6 is assumed as the client. Thanks in advance.
2
4312
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 used or does Outlook have to be used? Thanks for all help! Steve
0
2880
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. When the component is run on the exchange 2003 server a wizard gui is automatically started which wants to install Outlook 2003. The component is using mapi to access the default inbox. What do i need to do to convert this component to run on...
0
1589
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 myFormatsArray = data.GetFormats(false); // list of all formats when COPY to Clipboard from a file attached to
1
2046
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 tried to edit the code, as below (the original code is on his website) but get a load of error messages. There are only a few bits that need editing (about 6 or 7 little bits) but I still get loads of error messages and if anyone can help, I would...
0
3026
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 dates for e.g it should take inputs from 2 cells such as data from 12/10/2007 (b1cell)-12/11/2007(b2 cell). 2 then it should autmatically save the file in the specific location with specific name. 3 need to run this process automatically every...
3
4363
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 now the way I have this set up, but it's confusing and slow. When they browse for a place to save the reports, they see all of the drives on the terminal server as well as their own client drives. So they're likely to want to choose "My...
1
4887
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 program,which can upload many file in folder.problem is,am unable to save my file name in to database.because i used same name for all input file type as file. i dont know get name of file.below i presented my coding for ur view.fed up with my coding..pls...
0
10595
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
10343
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
10341
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
9171
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
6862
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
5530
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...
1
4308
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
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.