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

Can I use PropertyAccessor in Outlook 2007 to add x-headers?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 5th 07, 07:07 PM posted to microsoft.public.outlook.program_addins
Jeff Graves
external usenet poster
 
Posts: 3
Default Can I use PropertyAccessor in Outlook 2007 to add x-headers?

I know I *can* use Redemption to do this, but I've been able to do
everything else I needed to without using Redemption, so I'm hoping I
can overcome this last obstacle without having to use Redemption.
According to the docs:

http://msdn2.microsoft.com/en-us/lib...opertyaccessor

It looks like the PropertyAccessor is where I need to be to add this,
but the code below isn't working:

Private Sub Custom_ItemSend(ByVal oItem As Object, ByRef Cancel As
Boolean) Handles Application.ItemSend
Try
oItem.PropertyAccessor.SetProperty("http://
schemas.microsoft.com/mapi/string/{00020386-0000-0000-
C000-000000000046}/x-testheader", 12345)
oItem.Save()
Catch ex As Exception
Debug.Print(ex.Message)
End Try
End Sub

The message is sent and doesn't throw an exception but the x-header
isn't there. Any ideas here?

Ads
  #2  
Old April 5th 07, 09:45 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Can I use PropertyAccessor in Outlook 2007 to add x-headers?

Can you see that propety later with OutlookSpy or MFCMAPI?
The property needsto be a string, but you are passing an int: replace 12345
with "12345".

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

"Jeff Graves" wrote in message
ups.com...
I know I *can* use Redemption to do this, but I've been able to do
everything else I needed to without using Redemption, so I'm hoping I
can overcome this last obstacle without having to use Redemption.
According to the docs:

http://msdn2.microsoft.com/en-us/lib...opertyaccessor

It looks like the PropertyAccessor is where I need to be to add this,
but the code below isn't working:

Private Sub Custom_ItemSend(ByVal oItem As Object, ByRef Cancel As
Boolean) Handles Application.ItemSend
Try
oItem.PropertyAccessor.SetProperty("http://
schemas.microsoft.com/mapi/string/{00020386-0000-0000-
C000-000000000046}/x-testheader", 12345)
oItem.Save()
Catch ex As Exception
Debug.Print(ex.Message)
End Try
End Sub

The message is sent and doesn't throw an exception but the x-header
isn't there. Any ideas here?



  #3  
Old April 5th 07, 10:30 PM posted to microsoft.public.outlook.program_addins
Jeff Graves
external usenet poster
 
Posts: 3
Default Can I use PropertyAccessor in Outlook 2007 to add x-headers?

On Apr 5, 4:45 pm, "Dmitry Streblechenko" wrote:
Can you see that propety later with OutlookSpy or MFCMAPI?
The property needsto be a string, but you are passing an int: replace 12345
with "12345".

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

"Jeff Graves" wrote in message

ups.com...



I know I *can* use Redemption to do this, but I've been able to do
everything else I needed to without using Redemption, so I'm hoping I
can overcome this last obstacle without having to use Redemption.
According to the docs:


http://msdn2.microsoft.com/en-us/lib...officeoutlook2...


It looks like the PropertyAccessor is where I need to be to add this,
but the code below isn't working:


Private Sub Custom_ItemSend(ByVal oItem As Object, ByRef Cancel As
Boolean) Handles Application.ItemSend
Try
oItem.PropertyAccessor.SetProperty("http://
schemas.microsoft.com/mapi/string/{00020386-0000-0000-
C000-000000000046}/x-testheader", 12345)
oItem.Save()
Catch ex As Exception
Debug.Print(ex.Message)
End Try
End Sub


The message is sent and doesn't throw an exception but the x-header
isn't there. Any ideas here?- Hide quoted text -


- Show quoted text -


Dmitry,

That was it ... I wasn't sending a string value. As soon as I put
quotes around it, it showed up on the client. Thanks for your help!

Jeff

 




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
How to add extra headers to outlook 03? -- Outlook - General Queries 2 February 4th 07 04:57 AM
PropertyAccessor.GetProperty Peter Marchert Outlook and VBA 4 January 10th 07 09:14 PM
Outlook 2007 - How to show page headers? Bill Outlook - Using Forms 2 September 24th 06 02:39 PM
Outlook 2007 e-mail message headers download but not message body DJR Outlook - Installation 3 September 13th 06 03:00 AM
Outlook 2007 blank headers and dates Sam Steinhauser Outlook - General Queries 1 June 11th 06 07:07 PM


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