A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Attachments of saved MSG files



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 24th 08, 09:09 AM posted to microsoft.public.outlook.program_addins
MON205[_2_]
external usenet poster
 
Posts: 33
Default Attachments of saved MSG files

Hello,
I'm trying to open a MSG file (saved on disk) and get the names ans sizes of
attachments. GetAttachmentTable( ) returns S_OK but there are no info about
attachments. Also if you opened the MSG file with Outlook, and see the
attachments properties using OutlookSpy, you will notice that main
attachments info are not found.

How can I get these info?

Thanks
Ads
  #2  
Old June 24th 08, 07:19 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Attachments of saved MSG files

What exactly do you mean by "there are no info about attachments"?.
What properties are you trying to access? What exactly do you get?
Fo IMessage created on top of an MSG file, a very limited set of properties
is exposed. You need to open the attachment and then read properties from
it.
Keep in mind that when you double click on an MSG file, Outlook creates a
temporary message in the default store and copies the MSG file, so you are
not looking at the MSG file data.
You can see exposed properties in OutlookSpy: click Misc | OpenIMsgOnIStg.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hello,
I'm trying to open a MSG file (saved on disk) and get the names ans sizes
of
attachments. GetAttachmentTable( ) returns S_OK but there are no info
about
attachments. Also if you opened the MSG file with Outlook, and see the
attachments properties using OutlookSpy, you will notice that main
attachments info are not found.

How can I get these info?

Thanks



  #3  
Old June 25th 08, 08:51 AM posted to microsoft.public.outlook.program_addins
MON205[_2_]
external usenet poster
 
Posts: 33
Default Attachments of saved MSG files

I tried the Misc | OpenIMsgOnIStg and the same behavior found.
I need to read these properties:
1. PR_ATTACH_LONG_FILENAME_W,
2. PR_ATTACH_FILENAME_W
3. PR_DISPLAY_NAME
4. PR_ATTACH_SIZE
In OutlookSpy-IMessage-FetAttachmentTable(), Number of Rows displays the
correct number, but names of attachments a (Row # 0, Row # 1, ...), and
property tags exist are just(PR_ATTACH_METHOD, PR_ATTACH_MIME_TAG_W,
PR_ATTACH_NUM, PR_RECORD_KEY, PR_RENDERING_POSITION).

Another note that when the message exists in Outlook, and you view the
message, the attachments displayed as(name(size)), but if the MSG saved out
of Outlook, the attachments displayed as (name)... no size displayed, any way
I don't know how Outlook gets the attachment names.

Any ideas how can I get the attachment names and sizes of a saved MSG file?
Waiting for respond...

Thanks.
----------------------------------------------------------

"Dmitry Streblechenko" wrote:

What exactly do you mean by "there are no info about attachments"?.
What properties are you trying to access? What exactly do you get?
Fo IMessage created on top of an MSG file, a very limited set of properties
is exposed. You need to open the attachment and then read properties from
it.
Keep in mind that when you double click on an MSG file, Outlook creates a
temporary message in the default store and copies the MSG file, so you are
not looking at the MSG file data.
You can see exposed properties in OutlookSpy: click Misc | OpenIMsgOnIStg.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hello,
I'm trying to open a MSG file (saved on disk) and get the names ans sizes
of
attachments. GetAttachmentTable( ) returns S_OK but there are no info
about
attachments. Also if you opened the MSG file with Outlook, and see the
attachments properties using OutlookSpy, you will notice that main
attachments info are not found.

How can I get these info?

Thanks




  #4  
Old June 26th 08, 12:28 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Attachments of saved MSG files

Once again, you need to open the attachment using IMessage::OpenAttach (get
back IAttach), then use IAttach::GetProps or HrGetOneProp to read the
properties.
Double ccik on an attachment in OutlookSpy to see teh atatchment properties.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
I tried the Misc | OpenIMsgOnIStg and the same behavior found.
I need to read these properties:
1. PR_ATTACH_LONG_FILENAME_W,
2. PR_ATTACH_FILENAME_W
3. PR_DISPLAY_NAME
4. PR_ATTACH_SIZE
In OutlookSpy-IMessage-FetAttachmentTable(), Number of Rows displays the
correct number, but names of attachments a (Row # 0, Row # 1, ...), and
property tags exist are just(PR_ATTACH_METHOD, PR_ATTACH_MIME_TAG_W,
PR_ATTACH_NUM, PR_RECORD_KEY, PR_RENDERING_POSITION).

Another note that when the message exists in Outlook, and you view the
message, the attachments displayed as(name(size)), but if the MSG saved
out
of Outlook, the attachments displayed as (name)... no size displayed, any
way
I don't know how Outlook gets the attachment names.

Any ideas how can I get the attachment names and sizes of a saved MSG
file?
Waiting for respond...

Thanks.
----------------------------------------------------------

"Dmitry Streblechenko" wrote:

What exactly do you mean by "there are no info about attachments"?.
What properties are you trying to access? What exactly do you get?
Fo IMessage created on top of an MSG file, a very limited set of
properties
is exposed. You need to open the attachment and then read properties from
it.
Keep in mind that when you double click on an MSG file, Outlook creates a
temporary message in the default store and copies the MSG file, so you
are
not looking at the MSG file data.
You can see exposed properties in OutlookSpy: click Misc |
OpenIMsgOnIStg.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hello,
I'm trying to open a MSG file (saved on disk) and get the names ans
sizes
of
attachments. GetAttachmentTable( ) returns S_OK but there are no info
about
attachments. Also if you opened the MSG file with Outlook, and see the
attachments properties using OutlookSpy, you will notice that main
attachments info are not found.

How can I get these info?

Thanks






  #5  
Old June 26th 08, 03:10 PM posted to microsoft.public.outlook.program_addins
MON205[_2_]
external usenet poster
 
Posts: 33
Default Attachments of saved MSG files

Hi Dmitry,
Your way works fine. I can now get the name of the attachment. But still
cant get the size (PR_ATTACH_SIZE).
Anyway, when I try to do that from OutlookSpy, I can't get any data,
OpenAttach() results in an error message (IMessage::OpenAttach() returned
MAPI_E_NO_ACCESS).

As this works from my code, so I just need your help to get the size of the
attachment if it is possible.

Thanks again and again Dmitry

---------------------------------
"Dmitry Streblechenko" wrote:

Once again, you need to open the attachment using IMessage::OpenAttach (get
back IAttach), then use IAttach::GetProps or HrGetOneProp to read the
properties.
Double ccik on an attachment in OutlookSpy to see teh atatchment properties.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
I tried the Misc | OpenIMsgOnIStg and the same behavior found.
I need to read these properties:
1. PR_ATTACH_LONG_FILENAME_W,
2. PR_ATTACH_FILENAME_W
3. PR_DISPLAY_NAME
4. PR_ATTACH_SIZE
In OutlookSpy-IMessage-FetAttachmentTable(), Number of Rows displays the
correct number, but names of attachments a (Row # 0, Row # 1, ...), and
property tags exist are just(PR_ATTACH_METHOD, PR_ATTACH_MIME_TAG_W,
PR_ATTACH_NUM, PR_RECORD_KEY, PR_RENDERING_POSITION).

Another note that when the message exists in Outlook, and you view the
message, the attachments displayed as(name(size)), but if the MSG saved
out
of Outlook, the attachments displayed as (name)... no size displayed, any
way
I don't know how Outlook gets the attachment names.

Any ideas how can I get the attachment names and sizes of a saved MSG
file?
Waiting for respond...

Thanks.
----------------------------------------------------------

"Dmitry Streblechenko" wrote:

What exactly do you mean by "there are no info about attachments"?.
What properties are you trying to access? What exactly do you get?
Fo IMessage created on top of an MSG file, a very limited set of
properties
is exposed. You need to open the attachment and then read properties from
it.
Keep in mind that when you double click on an MSG file, Outlook creates a
temporary message in the default store and copies the MSG file, so you
are
not looking at the MSG file data.
You can see exposed properties in OutlookSpy: click Misc |
OpenIMsgOnIStg.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hello,
I'm trying to open a MSG file (saved on disk) and get the names ans
sizes
of
attachments. GetAttachmentTable( ) returns S_OK but there are no info
about
attachments. Also if you opened the MSG file with Outlook, and see the
attachments properties using OutlookSpy, you will notice that main
attachments info are not found.

How can I get these info?

Thanks






  #6  
Old July 1st 08, 06:10 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Attachments of saved MSG files

It is up to tehe provider to expose the PR_ATTACH_SIZE property (it is
attachment data plus whatever otheer properties are stored with an
attachment).
If it is not availble, the size of the data in PR_ATTACH_DATA_BIN would be a
good approximation
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hi Dmitry,
Your way works fine. I can now get the name of the attachment. But still
cant get the size (PR_ATTACH_SIZE).
Anyway, when I try to do that from OutlookSpy, I can't get any data,
OpenAttach() results in an error message (IMessage::OpenAttach() returned
MAPI_E_NO_ACCESS).

As this works from my code, so I just need your help to get the size of
the
attachment if it is possible.

Thanks again and again Dmitry

---------------------------------
"Dmitry Streblechenko" wrote:

Once again, you need to open the attachment using IMessage::OpenAttach
(get
back IAttach), then use IAttach::GetProps or HrGetOneProp to read the
properties.
Double ccik on an attachment in OutlookSpy to see teh atatchment
properties.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
I tried the Misc | OpenIMsgOnIStg and the same behavior found.
I need to read these properties:
1. PR_ATTACH_LONG_FILENAME_W,
2. PR_ATTACH_FILENAME_W
3. PR_DISPLAY_NAME
4. PR_ATTACH_SIZE
In OutlookSpy-IMessage-FetAttachmentTable(), Number of Rows displays
the
correct number, but names of attachments a (Row # 0, Row # 1, ...),
and
property tags exist are just(PR_ATTACH_METHOD, PR_ATTACH_MIME_TAG_W,
PR_ATTACH_NUM, PR_RECORD_KEY, PR_RENDERING_POSITION).

Another note that when the message exists in Outlook, and you view the
message, the attachments displayed as(name(size)), but if the MSG saved
out
of Outlook, the attachments displayed as (name)... no size displayed,
any
way
I don't know how Outlook gets the attachment names.

Any ideas how can I get the attachment names and sizes of a saved MSG
file?
Waiting for respond...

Thanks.
----------------------------------------------------------

"Dmitry Streblechenko" wrote:

What exactly do you mean by "there are no info about attachments"?.
What properties are you trying to access? What exactly do you get?
Fo IMessage created on top of an MSG file, a very limited set of
properties
is exposed. You need to open the attachment and then read properties
from
it.
Keep in mind that when you double click on an MSG file, Outlook
creates a
temporary message in the default store and copies the MSG file, so you
are
not looking at the MSG file data.
You can see exposed properties in OutlookSpy: click Misc |
OpenIMsgOnIStg.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hello,
I'm trying to open a MSG file (saved on disk) and get the names ans
sizes
of
attachments. GetAttachmentTable( ) returns S_OK but there are no
info
about
attachments. Also if you opened the MSG file with Outlook, and see
the
attachments properties using OutlookSpy, you will notice that main
attachments info are not found.

How can I get these info?

Thanks








  #7  
Old July 3rd 08, 12:58 PM posted to microsoft.public.outlook.program_addins
MON205[_2_]
external usenet poster
 
Posts: 33
Default Attachments of saved MSG files

Don't you despair ?!!!
Thanks Dmitry

"Dmitry Streblechenko" wrote:

It is up to tehe provider to expose the PR_ATTACH_SIZE property (it is
attachment data plus whatever otheer properties are stored with an
attachment).
If it is not availble, the size of the data in PR_ATTACH_DATA_BIN would be a
good approximation
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hi Dmitry,
Your way works fine. I can now get the name of the attachment. But still
cant get the size (PR_ATTACH_SIZE).
Anyway, when I try to do that from OutlookSpy, I can't get any data,
OpenAttach() results in an error message (IMessage::OpenAttach() returned
MAPI_E_NO_ACCESS).

As this works from my code, so I just need your help to get the size of
the
attachment if it is possible.

Thanks again and again Dmitry

---------------------------------
"Dmitry Streblechenko" wrote:

Once again, you need to open the attachment using IMessage::OpenAttach
(get
back IAttach), then use IAttach::GetProps or HrGetOneProp to read the
properties.
Double ccik on an attachment in OutlookSpy to see teh atatchment
properties.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
I tried the Misc | OpenIMsgOnIStg and the same behavior found.
I need to read these properties:
1. PR_ATTACH_LONG_FILENAME_W,
2. PR_ATTACH_FILENAME_W
3. PR_DISPLAY_NAME
4. PR_ATTACH_SIZE
In OutlookSpy-IMessage-FetAttachmentTable(), Number of Rows displays
the
correct number, but names of attachments a (Row # 0, Row # 1, ...),
and
property tags exist are just(PR_ATTACH_METHOD, PR_ATTACH_MIME_TAG_W,
PR_ATTACH_NUM, PR_RECORD_KEY, PR_RENDERING_POSITION).

Another note that when the message exists in Outlook, and you view the
message, the attachments displayed as(name(size)), but if the MSG saved
out
of Outlook, the attachments displayed as (name)... no size displayed,
any
way
I don't know how Outlook gets the attachment names.

Any ideas how can I get the attachment names and sizes of a saved MSG
file?
Waiting for respond...

Thanks.
----------------------------------------------------------

"Dmitry Streblechenko" wrote:

What exactly do you mean by "there are no info about attachments"?.
What properties are you trying to access? What exactly do you get?
Fo IMessage created on top of an MSG file, a very limited set of
properties
is exposed. You need to open the attachment and then read properties
from
it.
Keep in mind that when you double click on an MSG file, Outlook
creates a
temporary message in the default store and copies the MSG file, so you
are
not looking at the MSG file data.
You can see exposed properties in OutlookSpy: click Misc |
OpenIMsgOnIStg.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hello,
I'm trying to open a MSG file (saved on disk) and get the names ans
sizes
of
attachments. GetAttachmentTable( ) returns S_OK but there are no
info
about
attachments. Also if you opened the MSG file with Outlook, and see
the
attachments properties using OutlookSpy, you will notice that main
attachments info are not found.

How can I get these info?

Thanks









  #8  
Old July 4th 08, 12:42 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Attachments of saved MSG files

No, I like challenge :-)

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Don't you despair ?!!!
Thanks Dmitry

"Dmitry Streblechenko" wrote:

It is up to tehe provider to expose the PR_ATTACH_SIZE property (it is
attachment data plus whatever otheer properties are stored with an
attachment).
If it is not availble, the size of the data in PR_ATTACH_DATA_BIN would
be a
good approximation
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hi Dmitry,
Your way works fine. I can now get the name of the attachment. But
still
cant get the size (PR_ATTACH_SIZE).
Anyway, when I try to do that from OutlookSpy, I can't get any data,
OpenAttach() results in an error message (IMessage::OpenAttach()
returned
MAPI_E_NO_ACCESS).

As this works from my code, so I just need your help to get the size of
the
attachment if it is possible.

Thanks again and again Dmitry

---------------------------------
"Dmitry Streblechenko" wrote:

Once again, you need to open the attachment using IMessage::OpenAttach
(get
back IAttach), then use IAttach::GetProps or HrGetOneProp to read the
properties.
Double ccik on an attachment in OutlookSpy to see teh atatchment
properties.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
I tried the Misc | OpenIMsgOnIStg and the same behavior found.
I need to read these properties:
1. PR_ATTACH_LONG_FILENAME_W,
2. PR_ATTACH_FILENAME_W
3. PR_DISPLAY_NAME
4. PR_ATTACH_SIZE
In OutlookSpy-IMessage-FetAttachmentTable(), Number of Rows
displays
the
correct number, but names of attachments a (Row # 0, Row # 1,
...),
and
property tags exist are just(PR_ATTACH_METHOD, PR_ATTACH_MIME_TAG_W,
PR_ATTACH_NUM, PR_RECORD_KEY, PR_RENDERING_POSITION).

Another note that when the message exists in Outlook, and you view
the
message, the attachments displayed as(name(size)), but if the MSG
saved
out
of Outlook, the attachments displayed as (name)... no size
displayed,
any
way
I don't know how Outlook gets the attachment names.

Any ideas how can I get the attachment names and sizes of a saved
MSG
file?
Waiting for respond...

Thanks.
----------------------------------------------------------

"Dmitry Streblechenko" wrote:

What exactly do you mean by "there are no info about attachments"?.
What properties are you trying to access? What exactly do you get?
Fo IMessage created on top of an MSG file, a very limited set of
properties
is exposed. You need to open the attachment and then read
properties
from
it.
Keep in mind that when you double click on an MSG file, Outlook
creates a
temporary message in the default store and copies the MSG file, so
you
are
not looking at the MSG file data.
You can see exposed properties in OutlookSpy: click Misc |
OpenIMsgOnIStg.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" wrote in message
...
Hello,
I'm trying to open a MSG file (saved on disk) and get the names
ans
sizes
of
attachments. GetAttachmentTable( ) returns S_OK but there are no
info
about
attachments. Also if you opened the MSG file with Outlook, and
see
the
attachments properties using OutlookSpy, you will notice that
main
attachments info are not found.

How can I get these info?

Thanks











 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does deleting temp files remove attachments from saved msgs? Jack B Outlook Express 2 February 14th 08 04:51 PM
Saved .eml files SandyD Outlook Express 6 March 2nd 07 08:56 PM
OE .DBX saved files tenahacourt Outlook Express 6 January 5th 07 11:26 PM
importing saved files Annette Outlook - Using Contacts 4 September 17th 06 11:52 PM
Saved eml files Star Harbor Outlook Express 6 August 24th 06 10:13 PM


All times are GMT +1. The time now is 11:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.