chandrashekar
Well-known Member
- Joined
- Jul 15, 2005
- Messages
- 529
- Office Version
- 365
- Platform
- Windows
Hello,
am trying to save outlook attachments into local folder and its working fine but its working for folder which saved under Inbox how to extract it for other folders.(For ex: Folder in my Name which is not under Inbox).
Sub save_mail_attachments()
Dim AttachementPath As String: Dim NewFileName As String: Dim NewFileName2 As String
Dim olApp As Outlook.Application
Dim ns As Outlook.Namespace
Dim Inbox_Prog_Pace As MAPIFolder
Dim Item As Object
Dim PaceFile As Attachment
Set ns = GetNamespace("MAPI")
mail_foldername = ThisWorkbook.Worksheets(1).Range("C2")
AttachementPath = ThisWorkbook.Worksheets(1).Range("C3")
If Right(attachmentpath, 1) <> "" Then
AttachementPath = AttachementPath & ""
End If
Set Inbox_Prog_Pace = ns.GetDefaultFolder(olFolderInbox).Folders("SC")
Regards,
Chandru
am trying to save outlook attachments into local folder and its working fine but its working for folder which saved under Inbox how to extract it for other folders.(For ex: Folder in my Name which is not under Inbox).
Sub save_mail_attachments()
Dim AttachementPath As String: Dim NewFileName As String: Dim NewFileName2 As String
Dim olApp As Outlook.Application
Dim ns As Outlook.Namespace
Dim Inbox_Prog_Pace As MAPIFolder
Dim Item As Object
Dim PaceFile As Attachment
Set ns = GetNamespace("MAPI")
mail_foldername = ThisWorkbook.Worksheets(1).Range("C2")
AttachementPath = ThisWorkbook.Worksheets(1).Range("C3")
If Right(attachmentpath, 1) <> "" Then
AttachementPath = AttachementPath & ""
End If
Set Inbox_Prog_Pace = ns.GetDefaultFolder(olFolderInbox).Folders("SC")
Regards,
Chandru