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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Adding property to attachment via macro



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 21st 07, 04:16 PM posted to microsoft.public.outlook.program_vba
BZ
external usenet poster
 
Posts: 5
Default Adding property to attachment via macro

Hey there,

I have a utility (created by someone else in our company) that processes
certain messages. They speak another language and are in another TZ with 6
hours difference so communication is a little tough. :-) Their utility
expects the mail item to have a certain message class, and have an
attachment with a certain property on it (which is normally there but on all
but a few). I have written a simple macro to change the message class and
this works. Also I can add the property to the attachment using Outlook Spy,
and then the utility will work fine on the mail item.

Question: Can someone show (or point me to a link) example macro code for
setting a property on an attachment? Doubt it matters for the example, but
the property tag I need to add is 0x370E001E (PR_ATTACH_MIME_TAG).

Thanks!
BZ


Ads
  #2  
Old March 22nd 07, 12:14 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Adding property to attachment via macro

You cannot add that property using the Outlook Object Model, you will need
to use Extended MAPI (C++/Delphi only), CDO 1.21 or Redemption.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"BZ" wrote in message
...
Hey there,

I have a utility (created by someone else in our company) that processes
certain messages. They speak another language and are in another TZ with 6
hours difference so communication is a little tough. :-) Their utility
expects the mail item to have a certain message class, and have an
attachment with a certain property on it (which is normally there but on
all but a few). I have written a simple macro to change the message class
and this works. Also I can add the property to the attachment using
Outlook Spy, and then the utility will work fine on the mail item.

Question: Can someone show (or point me to a link) example macro code for
setting a property on an attachment? Doubt it matters for the example, but
the property tag I need to add is 0x370E001E (PR_ATTACH_MIME_TAG).

Thanks!
BZ



  #3  
Old March 23rd 07, 12:00 AM posted to microsoft.public.outlook.program_vba
BZ
external usenet poster
 
Posts: 5
Default Adding property to attachment via macro

"Dmitry Streblechenko" wrote in message
...
You cannot add that property using the Outlook Object Model, you will need
to use Extended MAPI (C++/Delphi only), CDO 1.21 or Redemption.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


Ahh crud. Well at least with your 'OutlookSpy' utility Dmitry I can add it
manually for myself. Anyone else at work will just have to fend for
themselves. :-) It is a rare thing that this property is missing on said
emails so I don't believe it is worth the effort, by itself, of me learning
the trade.

In case I do find such time, I have two dated books on my shelf he
1) "Programming Microsoft Outlook and Microsoft Exchange" by Thomas Rizzo
2) "Building Applications with Microsoft Outlook 2000 Technical Reference"
by Randy Byrne (forward by Sue Mosher)

Also a CD labeled "Inside MAPI" by Irving De la Cruz and Les Thaler.

As you can guess, at one time I thought of doing something more advanced but
there just wasn't enough hours in the day as we all know. Are these
resources too dated to be of any use with Outlook 2003/2007?

Thanks,
BZ


  #4  
Old March 24th 07, 01:22 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Adding property to attachment via macro

All of them are still applicable.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"BZ" wrote in message
...
"Dmitry Streblechenko" wrote in message
...
You cannot add that property using the Outlook Object Model, you will
need to use Extended MAPI (C++/Delphi only), CDO 1.21 or Redemption.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


Ahh crud. Well at least with your 'OutlookSpy' utility Dmitry I can add it
manually for myself. Anyone else at work will just have to fend for
themselves. :-) It is a rare thing that this property is missing on said
emails so I don't believe it is worth the effort, by itself, of me
learning the trade.

In case I do find such time, I have two dated books on my shelf he
1) "Programming Microsoft Outlook and Microsoft Exchange" by Thomas Rizzo
2) "Building Applications with Microsoft Outlook 2000 Technical Reference"
by Randy Byrne (forward by Sue Mosher)

Also a CD labeled "Inside MAPI" by Irving De la Cruz and Les Thaler.

As you can guess, at one time I thought of doing something more advanced
but there just wasn't enough hours in the day as we all know. Are these
resources too dated to be of any use with Outlook 2003/2007?

Thanks,
BZ




 




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
Adding a macro to outlook (2003) stephen_b Outlook and VBA 1 January 17th 07 06:18 AM
Save Attachment Using Macro [email protected] Outlook and VBA 3 August 8th 06 04:42 PM
Adding attachment to message David Wendt Add-ins for Outlook 5 April 24th 06 03:28 PM
Macro to add an attachment Bear Outlook - Using Forms 1 February 3rd 06 05:57 AM
Troubles adding a macro to Mail Message - help please [email protected] Outlook and VBA 4 January 27th 06 12:01 AM


All times are GMT +1. The time now is 08:57 PM.


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.