Isolating embedded pictures in emails

J

Jack Schitt

Hi all

Someone sent an email to me that contained a cute animated picture. It does
not seem to be an "attachment". I wanted to save the picture outside of the
email so that I could use it elsewhere. I have seen files with .GIF
extensions that can be animated and was expecting this when I rightclicked
on the image and selected "save picture as ..." However when I tried this
it prompted me to save a .BMP file (no option to change the extension),
which then saved just a single frame of the animation.

What am I doing wrong, please? As you may have guessed from the above I am
a bit new to all this.
 
J

Jack Schitt

Hi, I tried the macro from the link suggested below. Macro reads:

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 (strFolderpath.SpecialFolders("Desktop") & "\" &
objAttachment.FileName)
Next

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub

I get a compile error (variable not defined) on the line
Set strFolderpath = CreateObject("WScript.Shell")

This does not entirely surprise me as there is no DIM statement defining
StrFolderpath

Help??

Thanks
--
Return email address is not as DEEP as it appears
Roady said:
Unfortunately Outlook only allows embedded pictures to be saved in
bmp-format. To save them in gif-format you'll need to use a macro.
http://www.howto-outlook.com/howto/saveembeddedpictures.htm

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
 
R

Roady [MVP]

Are the VBA, Microsoft Office and Microsoft Outlook Object Library selected
in Tools-> References?
I also have OLE Automation Microsoft Forms Object Library selected but IIRC
these are not needed.

The guide has been blogged a couple of times and has lots of hits so I don't
think there is a serious error in the code ;-)

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
Jack Schitt said:
Hi, I tried the macro from the link suggested below. Macro reads:

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 (strFolderpath.SpecialFolders("Desktop") & "\" &
objAttachment.FileName)
Next

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub

I get a compile error (variable not defined) on the line
Set strFolderpath = CreateObject("WScript.Shell")

This does not entirely surprise me as there is no DIM statement defining
StrFolderpath

Help??

Thanks
--
Return email address is not as DEEP as it appears
in
message news:[email protected]...
Unfortunately Outlook only allows embedded pictures to be saved in
bmp-format. To save them in gif-format you'll need to use a macro.
http://www.howto-outlook.com/howto/saveembeddedpictures.htm

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
Jack Schitt said:
Hi all

Someone sent an email to me that contained a cute animated picture. It
does
not seem to be an "attachment". I wanted to save the picture outside
of
the
email so that I could use it elsewhere. I have seen files with .GIF
extensions that can be animated and was expecting this when I rightclicked
on the image and selected "save picture as ..." However when I tried this
it prompted me to save a .BMP file (no option to change the extension),
which then saved just a single frame of the animation.

What am I doing wrong, please? As you may have guessed from the above
I
am
a bit new to all this.
 
J

Jack Schitt

Hi, yes they are all selected.
I seem to have got around the problem just by manually adding the line:
Dim strFolderpath

Not sure if it should be DIMmed as a Variant, as above, but it works.

--
Return email address is not as DEEP as it appears
Roady said:
Are the VBA, Microsoft Office and Microsoft Outlook Object Library selected
in Tools-> References?
I also have OLE Automation Microsoft Forms Object Library selected but IIRC
these are not needed.

The guide has been blogged a couple of times and has lots of hits so I don't
think there is a serious error in the code ;-)

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
Jack Schitt said:
Hi, I tried the macro from the link suggested below. Macro reads:

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 (strFolderpath.SpecialFolders("Desktop") & "\" &
objAttachment.FileName)
Next

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub

I get a compile error (variable not defined) on the line
Set strFolderpath = CreateObject("WScript.Shell")

This does not entirely surprise me as there is no DIM statement defining
StrFolderpath

Help??

Thanks
--
Return email address is not as DEEP as it appears
in
message news:[email protected]...
Unfortunately Outlook only allows embedded pictures to be saved in
bmp-format. To save them in gif-format you'll need to use a macro.
http://www.howto-outlook.com/howto/saveembeddedpictures.htm

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
Hi all

Someone sent an email to me that contained a cute animated picture. It
does
not seem to be an "attachment". I wanted to save the picture outside
of
the
email so that I could use it elsewhere. I have seen files with .GIF
extensions that can be animated and was expecting this when I rightclicked
on the image and selected "save picture as ..." However when I tried this
it prompted me to save a .BMP file (no option to change the extension),
which then saved just a single frame of the animation.

What am I doing wrong, please? As you may have guessed from the above
I
am
a bit new to all this.
 
R

Roady [MVP]

Hmm, don't know what's wrong. Do you have more macro's? I reformatted my
system last weekend to get rid of all BETA's so I just did a clean "install"
on the macro and it's working without issue for me still.

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
Jack Schitt said:
Hi, yes they are all selected.
I seem to have got around the problem just by manually adding the line:
Dim strFolderpath

Not sure if it should be DIMmed as a Variant, as above, but it works.

--
Return email address is not as DEEP as it appears
in
message news:[email protected]...
Are the VBA, Microsoft Office and Microsoft Outlook Object Library selected
in Tools-> References?
I also have OLE Automation Microsoft Forms Object Library selected but IIRC
these are not needed.

The guide has been blogged a couple of times and has lots of hits so I don't
think there is a serious error in the code ;-)

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
Jack Schitt said:
Hi, I tried the macro from the link suggested below. Macro reads:

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 (strFolderpath.SpecialFolders("Desktop") &
"\" &
objAttachment.FileName)
Next

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub

I get a compile error (variable not defined) on the line
Set strFolderpath = CreateObject("WScript.Shell")

This does not entirely surprise me as there is no DIM statement
defining
StrFolderpath

Help??

Thanks
--
Return email address is not as DEEP as it appears
"Roady [MVP]" <newsgroups_DELETE_@_DELETE_sparnaaij_NO_._SPAM_net>
wrote
in
message Unfortunately Outlook only allows embedded pictures to be saved in
bmp-format. To save them in gif-format you'll need to use a macro.
http://www.howto-outlook.com/howto/saveembeddedpictures.htm

--
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-What do the Outlook Icons Mean?
-Create an Office 2003 CD slipstreamed with Service Pack 1

-----
Hi all

Someone sent an email to me that contained a cute animated picture. It
does
not seem to be an "attachment". I wanted to save the picture
outside
of
the
email so that I could use it elsewhere. I have seen files with .GIF
extensions that can be animated and was expecting this when I
rightclicked
on the image and selected "save picture as ..." However when I
tried
this
it prompted me to save a .BMP file (no option to change the extension),
which then saved just a single frame of the animation.

What am I doing wrong, please? As you may have guessed from the above
I
am
a bit new to all this.
 

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