Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.
Sub SaveAttachments() Dim olkSelectedItems As Object, _ olkItem As Object, _ objFile As Object, _ objDict As Object, _ strFilename As String, _ arrLines As Variant, _ varName As Variant, _ varTemp As Variant strFilename = "" Set olkSelectedItems = Application.ActiveExplorer.Selection For Each olkItem In olkSelectedItems Set objDict = CreateObject("Scripting.Dictionary") If olkItem.Attachments.Count > 0 Then arrLines = Split(olkItem.Body, vbCrLf) For Each varName In arrLines varTemp = Trim(varName) If Left(varTemp, 1) = "*" Then If Not objDict.Exists(varTemp) Then objDict.Add Mid(varTemp, 2), Mid(varTemp, 2) End If End If Next arrLines = objDict.Items() For Each objFile In olkItem.Attachments For Each varName In arrLines strFilename = "c:\OutlookTemp\" & varName objFile.SaveAsFile strFilename Next Next End If Next Set objDict = Nothing Set objFile = Nothing Set olkItem = Nothing Set olkSelectedItems = Nothing End Sub
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!