D
Dtown Dawg
Here is the code below. This saves animated gifs from Outlook. Currently it
saves it to the desktop. How do I change it from saving to the desktop to My
Pictures?
Sub SaveAttachment()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment
Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")
For Each objAttachment In colAttachments
objAttachment.SaveAsFile (strFolderpath.SpecialFolders("Desktop") & "\" &
objAttachment.FileName)
Next
Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing
End Sub
saves it to the desktop. How do I change it from saving to the desktop to My
Pictures?
Sub SaveAttachment()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment
Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")
For Each objAttachment In colAttachments
objAttachment.SaveAsFile (strFolderpath.SpecialFolders("Desktop") & "\" &
objAttachment.FileName)
Next
Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing
End Sub