View Single Post
  #8  
Old May 12th 09, 07:15 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default message attachment saved by Outlook.Attachment.SaveFileAs not

I'm interested in the attachment type because if you are saving embedded
images as MSG files you never will be able to open them. Only embedded
Outlook objects can be saved as MSG files and then reopened. The fact that
they cannot be opened when Outlook is running or not running already leads
me to believe that they aren't Outlook objects but some other type of
attachment.

Another test would be to try opening the saved files using code, with the
CreateItemFromTemplate() method. If that also fails then we're not dealing
with proper MSG files.

If you look at an attached Outlook object attachment using OutlookSpy you
will see the property PR_ATTACH_METHOD (0x37050003), which will be set to 5
(ATTACH_EMBEDDED_MSG).

You will also see another property, PR_ATTACH_DATA_OBJ (0x3701000D), that's
not there with other types of attachments.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"arcfan" wrote in message
...
Ken,

I really don't care about the attachment type. I save all attachment items
going through in for each and save them in shared folder (UNC).

The way how I test it, I explore the UNC path and see the items I saved
(doc, xls, jpeg, .... and .msg too). When I double on any item but .msg it
opens perfectly in a corresponding windows extension mapped application
(.doc
in word, .xls in Excel...)

TO answer your question: "does it open as an Outlook item? Does it open at
all?"
Yes system recognize the item as outlook item and attempt to open the item
with outlook but fails with the following error message.


When I double click on .msg (I have OL 2007. OL 2007 was not launched when
I
attempt to open the saved embedded message items) and I get the
following..

---------------------------
Microsoft Office Outlook
---------------------------
Cannot start Microsoft Office Outlook. Cannot read the item.
---------------------------
OK
---------------------------

If I had OL 2007 launched already and double click on the saved embedded
message then I get the following error

---------------------------
Microsoft Office Outlook
---------------------------
Cannot read the item.
---------------------------
OK
---------------------------

I just used 2003 Outlook Object Model and saved the attachment. Why I'm
not
able to open the .msg attachments? I can live with temporary solution for
some time. All I want to do is some way to see the save email item
properties
and see what it is... I tried OutlookSpy and that did not help eiether.

I really don't find any documentation about this and badly need help from
experts like you... Please help.

Regards,
Selvam.


Ads