Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!
Sub SaveToFolder(MyMail As MailItem) Dim strID As String Dim objNS As Outlook.NameSpace Dim objMail As Outlook.MailItem Dim objAtt As Outlook.Attachment Dim c As Integer Dim save_name As String 'Place path to sav to on next line. Note that you must include the 'final backslash Const save_path As String = "\\Network share\" strID = MyMail.EntryID Set objNS = Application.GetNamespace("MAPI") Set objMail = objNS.GetItemFromID(strID) If objMail.Attachments.Count > 0 Then For c = 1 To objMail.Attachments.Count Set objAtt = objMail.Attachments(c) save_name = Left(objAtt.FileName, Len(objAtt.FileName) - 5) save_name = save_name & Format(objMail.ReceivedTime, "_mm-dd-yyyy") save_name = save_name & Right(objAtt.FileName, 5) objAtt.SaveAsFile save_path & save_name Next End If Set objAtt = Nothing Set objMail = Nothing Set objNS = Nothing End Sub Sub Region1() End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|powershell import vcard office 365 or copy from public folder to all user||7||41|
|Powershell command to find 2FA status on Office365||4||34|
|Strip 'trailing' spaces||10||31|
|Content of a read only textbox are not being saved in table in asp.net - VB||5||34|
Join the community of 500,000 technology professionals and ask your questions.