PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming view multiple attachments

Reply

view multiple attachments

 
Thread Tools Rate Thread
Old 13-12-2006, 12:46 PM   #1
kappler
Junior Member
 
Join Date: Dec 2006
Posts: 1
Trader Rating: (0)
Default view multiple attachments


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
kappler is offline   Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off