S
StargateFan
I just don't know how to fix this.
The code below comes from a website that was recommended in one of
these Outlook ngs and it allows us to save embedded graphics in
messages. It has one _serious_ flaw, if the folder isn't present, the
graphics aren't saved and we aren't warned of this fact so it's
sometimes after I've deleted the msgs that I realize this fact (and,
yes, I keep clearing out my desktop and keep forgetting to re-create
the folder <sigh>).
Pls help.
Thanks.
****************************************************************
Sub SaveAttachment()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment
Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")
For Each objAttachment In colAttachments
objAttachment.SaveAsFile
("C:\WINDOWS\Desktop\OutlookEmbeddedGraphics\" &
objAttachment.FileName)
Next
Set objAttachment = Nothing
Set colAttachments = Nothing
Set objCurrentItem = Nothing
End Sub
****************************************************************
The code below comes from a website that was recommended in one of
these Outlook ngs and it allows us to save embedded graphics in
messages. It has one _serious_ flaw, if the folder isn't present, the
graphics aren't saved and we aren't warned of this fact so it's
sometimes after I've deleted the msgs that I realize this fact (and,
yes, I keep clearing out my desktop and keep forgetting to re-create
the folder <sigh>).
Pls help.
Thanks.
****************************************************************
Sub SaveAttachment()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment
Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")
For Each objAttachment In colAttachments
objAttachment.SaveAsFile
("C:\WINDOWS\Desktop\OutlookEmbeddedGraphics\" &
objAttachment.FileName)
Next
Set objAttachment = Nothing
Set colAttachments = Nothing
Set objCurrentItem = Nothing
End Sub
****************************************************************