Hi,
Thanks for posting in the community!
From your description, you are going to find one method to retrieve the
attachment of the attachment in one mailitem.
So far as I know, there is no one "cast" way, as you mentioned, existing
for this in Outlook object. I'd suggest one workaround can provide some
assistance for you. To retrieve the attachment in one attachment, you can
first save the first attachment into one .msg file and then open the msg
file, save the attachment in it into one msg file again. Then, open the
second msg file. This way, you can retrieve the information in the
attachment of one attachment. I create one sample codes for you on this.
'Code begin ----------------------------------------------------
Dim myOlapp As Outlook.Application
Dim myNamespace As NameSpace
Dim myfolder As MAPIFolder
Dim myItem As MailItem
Dim test2Item As MailItem
Set myOlapp = Application
Set myNamespace = myOlapp.GetNamespace("MAPI")
Set myfolder = myNamespace.GetDefaultFolder(olFolderInbox)
Set myItem = myfolder.Items("aa")
Debug.Print myItem.Attachments.Count
Debug.Print myItem.Attachments.Class
Debug.Print myItem.Attachments.Item(1).Class
myItem.Attachments.Item(1).SaveAsFile "E:\test.msg"
'Open the attachement
Set myItem = Application.CreateItemFromTemplate("e:\test.msg")
If myItem.Attachments.Count = 1 Then
myItem.Attachments.Item(1).SaveAsFile "e:\test2.msg"
End If
Set test2Item = Application.CreateItemFromTemplate("e:\test2.msg")
test2Item.Display
'Code end ------------------------------------------------------
Furthermore, I think your cast suggestion is very cool. I'd recommend that
you forward this idea to the Microsoft Wish Program:
1. World Wide Web
a)In Internet Explorer 6, click Send Feedback on the Help menu and then
click the link in the Product Suggestion section of the page that appears.
b)In Windows XP, click Help and Support on the Start menu. Click Send
your feedback to Microsoft, and then fill out the Product Suggestion page
that appears.
c)Visit the following Microsoft Web site:
http://www.microsoft.com/ms.htm
d)Click Microsoft.com Guide in the upper-right corner of the page and
then click Contact Us . Click the link in the Product Suggestion section of
the page that appears.
e)Visit the following Microsoft Product Feedback Web site
http://register.microsoft.com/mswish/suggestion.asp
and then complete and submit the form.
2. E-mail - To send comments or suggestions via e-mail, use the following
Microsoft Wish Program e-mail address, (e-mail address removed).
3. FAX - To send comments or suggestions via FAX, use the following
Microsoft FAX number, (425) 936-7329.
NOTE : Address the FAX to the attention of the Microsoft Wish Program.
4. US Mail - To send comments or suggestions via US Mail, use the following
Microsoft mailing address:
Microsoft Corporation
Attn. Microsoft Wish Program
One Microsoft Way
Redmond, WA 98052-6399
Please feel free to let me know if you have any further questions. I am
standing by to be of assistance.
Enjoy a nice weekend!
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.