view multiple attachments

Joined
Dec 13, 2006
Messages
1
Reaction score
0
Is there a way of modifying the code below (found it on expert forum) so that all email attachments are viewed as thumbnails instead of in seperate windows for each attachment

Code is a s follows:


Sub ViewAttachments()
On Error Resume Next

Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olFolder As Outlook.MAPIFolder
Dim olMsg As Outlook.MailItem
Dim olAttach As Outlook.Attachment
Dim strSavePath As String

Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetSharedDefaultFolder(olApp.Session.CurrentUser, olFolderInbox)

Set olMsg = olApp.ActiveExplorer.Selection.Item(1)
For Each olAttach In olMsg.Attachments
strSavePath = "c:\Windows\Temp\" & olAttach.FileName
olAttach.SaveAsFile (strSavePath)
Shell ("explorer.exe " & strSavePath)
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top