![]() |
#1
|
|||
|
|||
![]()
I'd like to know if there is a shortcut key for downloading attachments from a received e-mail.
|
#2
|
||||
|
||||
![]()
Isn't Right Click > Save All Attachments short enough for you?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
![]()
Yes but I'd have to point to the attached file first, which would not do. I'd like to do it solely via a keyboard, and quickly. It would defeat the purpose of using a shortcut key if a mouse were to intervene.
|
#4
|
||||
|
||||
![]()
You can do it with a keyboard shortcut attached to the macro ProcessSelectedMessage (or run SaveAttachments as a script from a rule as the messages arrive, which needs no shortcut or further user involvement)
Code:
Option Explicit Sub ProcessSelectedMessage() Dim olMsg As MailItem On Error GoTo lbl_Exit Set olMsg = ActiveExplorer.Selection.Item(1) SaveAttachments olMsg lbl_Exit: Exit Sub End Sub Sub SaveAttachments(Item As Outlook.MailItem) Dim olAtt As Attachment Dim strFileName As String Const strPath As String = "C:\Path\" 'The path where the files are to be saved If Item.Attachments.Count > 0 Then For Each olAtt In Item.Attachments If Not olAtt.FileName Like "image*.*" Then strFileName = strPath & olAtt.FileName olAtt.SaveAsFile strFileName End If Next olAtt End If lbl_Exit: Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
![]()
Thank you for the code.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
rambler289 | Outlook | 1 | 09-29-2015 09:33 PM |
Outlook Mail Shortcut Keys? | gratiot | Outlook | 3 | 07-29-2011 10:31 AM |
![]() |
wineattorney | Outlook | 1 | 03-29-2011 02:15 AM |
![]() |
glcohenjr | Outlook | 1 | 08-16-2010 02:59 PM |
Outlook 2003 - Downloading all mail through send/receive | tmonkey | Outlook | 0 | 12-25-2008 03:14 PM |