A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Save attachment if email is from joe



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 7th 10, 09:03 PM posted to microsoft.public.outlook.program_vba
JOE
external usenet poster
 
Posts: 162
Default Save attachment if email is from joe

I need to save an attachment to a specific network drive/folder if an email
comes from a specific person. I know som excel vba but nothing in access,
can u guys help me out?

Thanks!~
Ads
  #2  
Old April 8th 10, 09:13 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Save attachment if email is from joe


You can create a rule in Outlook to run a script that might look like this:

Public Sub SaveAtt(Mail as Outlook.MailItem)
Dim Att as Outlook.Attachment
If Mail.Attachments.Count Then
Set Att=Mail.Attachments(1)
Att.SaveAsFile "c:\" & Att.Filename
Endif
End Sub

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 7 Apr 2010 12:03:03 -0700 schrieb Joe:

I need to save an attachment to a specific network drive/folder if an

email
comes from a specific person. I know som excel vba but nothing in access,
can u guys help me out?

Thanks!~

  #3  
Old April 8th 10, 02:01 PM posted to microsoft.public.outlook.program_vba
JOE
external usenet poster
 
Posts: 162
Default Save attachment if email is from joe

Should i set up a specific email and on a application server so that the
account is always logged in and not dependant on someone? How do i deal with
something like that? My comp IT dept isnt handy at all and they are on the
other side of the planet

Thank you

"Michael Bauer [MVP - Outlook]" wrote:


You can create a rule in Outlook to run a script that might look like this:

Public Sub SaveAtt(Mail as Outlook.MailItem)
Dim Att as Outlook.Attachment
If Mail.Attachments.Count Then
Set Att=Mail.Attachments(1)
Att.SaveAsFile "c:\" & Att.Filename
Endif
End Sub

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 7 Apr 2010 12:03:03 -0700 schrieb Joe:

I need to save an attachment to a specific network drive/folder if an

email
comes from a specific person. I know som excel vba but nothing in access,
can u guys help me out?

Thanks!~

.

  #4  
Old April 8th 10, 02:26 PM posted to microsoft.public.outlook.program_vba
JOE
external usenet poster
 
Posts: 162
Default Save attachment if email is from joe

I set up a rule to run a script and got a message that it is a client-only
rul and will process only when outlook is running. I used your code and put
it in a module i added in the vba ide under the moduels folder. Please see
my prior post about doing it so that it will always run

"Michael Bauer [MVP - Outlook]" wrote:


You can create a rule in Outlook to run a script that might look like this:

Public Sub SaveAtt(Mail as Outlook.MailItem)
Dim Att as Outlook.Attachment
If Mail.Attachments.Count Then
Set Att=Mail.Attachments(1)
Att.SaveAsFile "c:\" & Att.Filename
Endif
End Sub

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 7 Apr 2010 12:03:03 -0700 schrieb Joe:

I need to save an attachment to a specific network drive/folder if an

email
comes from a specific person. I know som excel vba but nothing in access,
can u guys help me out?

Thanks!~

.

  #5  
Old April 8th 10, 05:34 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Save attachment if email is from joe



The VBA macro can be run only within Outlook, not on the server.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Thu, 8 Apr 2010 05:01:01 -0700 schrieb Joe:

Should i set up a specific email and on a application server so that the
account is always logged in and not dependant on someone? How do i deal

with
something like that? My comp IT dept isnt handy at all and they are on

the
other side of the planet

Thank you

"Michael Bauer [MVP - Outlook]" wrote:


You can create a rule in Outlook to run a script that might look like

this:

Public Sub SaveAtt(Mail as Outlook.MailItem)
Dim Att as Outlook.Attachment
If Mail.Attachments.Count Then
Set Att=Mail.Attachments(1)
Att.SaveAsFile "c:\" & Att.Filename
Endif
End Sub

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 7 Apr 2010 12:03:03 -0700 schrieb Joe:

I need to save an attachment to a specific network drive/folder if an

email
comes from a specific person. I know som excel vba but nothing in

access,
can u guys help me out?

Thanks!~

.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save attachment? jayC[_2_] Outlook - General Queries 2 April 22nd 08 03:06 PM
attachment save godadj Outlook and VBA 0 February 11th 08 05:41 PM
change incoming email attachment default to "open" vs "save as" conroy Outlook - General Queries 1 December 12th 06 02:58 AM
script for Save as Attachment, when a email comes for a single person [email protected] Outlook and VBA 1 August 25th 06 07:01 AM
How can I save an attachment that is an email to my inbox? matt69 Outlook and VBA 5 April 14th 06 07:19 AM


All times are GMT +1. The time now is 12:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.