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

How to work with mail items in outlook 2003(C++)



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 23rd 08, 08:44 AM posted to microsoft.public.outlook.program_addins
Roman[_2_]
external usenet poster
 
Posts: 2
Default How to work with mail items in outlook 2003(C++)

Hi,
I am very new in C++ and working on Add-in for outlook 2003.
Can anyone adviced me how to extract attachments from mail which linked to
other mail
(user create new mail "MAIL1" and insert item for example "MAIL2"mail with
attachments "ATTACH1" and "ATTACH2" from inbox folder)

On some event I recieve attachment list for MAIL1
MyMethod((LPDISPATCH pMailItem...)
{
....
hr = GetProperty(pMailItem, L"Attachments", &vtAttachments); // I recieve
"MAIL2"

but how extract attachments from this "MAIL2" ?
Can anyone help?

Thanks in advance
Ads
  #2  
Old December 24th 08, 06:16 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to work with mail items in outlook 2003(C++)

The best you can do in the Outlook Obejct Model (the other alternatives are
Extended MAPI or Redemption) is to check teh Attachment.Type property, and
if it is olEmbeddeditem (5), call Attachmeent.SaveAsFile.
You can then reopen the resulting MSG file using Namespace.OpenSharedItem
(OUtlook 2007 specific) or use Application.CreateItemfromTemplate (it will
wipe out all the sender related data).

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Roman" wrote in message
...
Hi,
I am very new in C++ and working on Add-in for outlook 2003.
Can anyone adviced me how to extract attachments from mail which linked to
other mail
(user create new mail "MAIL1" and insert item for example "MAIL2"mail with
attachments "ATTACH1" and "ATTACH2" from inbox folder)

On some event I recieve attachment list for MAIL1
MyMethod((LPDISPATCH pMailItem...)
{
...
hr = GetProperty(pMailItem, L"Attachments", &vtAttachments); // I recieve
"MAIL2"

but how extract attachments from this "MAIL2" ?
Can anyone help?

Thanks in advance



  #3  
Old December 24th 08, 02:25 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 24
Default How to work with mail items in outlook 2003(C++)

On Dec 24, 1:16*am, "Dmitry Streblechenko" wrote:
The best you can do in the Outlook Obejct Model (the other alternatives are
Extended MAPI or Redemption) is to check teh Attachment.Type property, and
if it is olEmbeddeditem (5), call Attachmeent.SaveAsFile.
You can then reopen the resulting MSG file using Namespace.OpenSharedItem
(OUtlook 2007 specific) or use Application.CreateItemfromTemplate (it will
wipe out all the sender related data).

--
Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy *- Outlook, CDO
and MAPI Developer Tool
-"Roman" wrote in message

...

*Hi,
I am very new in C++ and working on Add-in for outlook 2003.
Can anyone adviced me how to extract attachments from mail which linked to
other mail
(user create new mail "MAIL1" and insert item for example "MAIL2"mail with
attachments "ATTACH1" and "ATTACH2" from inbox folder)


On some event I recieve *attachment list for MAIL1
MyMethod((LPDISPATCH pMailItem...)
{
...
hr = GetProperty(pMailItem, L"Attachments", &vtAttachments); // I recieve
"MAIL2"


but how extract attachments from this "MAIL2" ?
Can anyone help?


Thanks in advance


Alternatively, look into Redemption. If you want more power than the
OOM offers but don't want to make your eyes bleed, it's a fantastic
way to get stuff done.
 




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
Outlook 2003 Junk e-mail filter does not work toddso Outlook - Installation 5 December 22nd 07 11:11 AM
Rules in Outlook 2003 not work while receiving mail? EC Outlook - Installation 2 October 18th 06 03:34 AM
I can not get Outlook 2003 to work with my COX e-mail account TMK Outlook - Installation 1 July 8th 06 09:05 AM
how to retain 10 days items in Outlook 2003 deleted items folder? Balthazar Outlook - Installation 2 June 7th 06 04:05 PM
Outlook 2007: Purge Deleted Items doesn't work [email protected] Outlook - General Queries 8 May 31st 06 07:51 AM


All times are GMT +1. The time now is 08:40 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.