PC Review


Reply
Thread Tools Rate Thread

How to add field in SafeMailItem's fields collection?

 
 
Dhananjay Pandit
Guest
Posts: n/a
 
      16th Apr 2008
Hi All,
I am developing one COM-Addin using VSTO SE / VB 2005 / Outlook 2007. I am using redemption to change some fields of mailitem. Basically I am sending mailitem using webservice & hence cancelling Application_Send event. I need to save my Sent Item (which is not sent by outlook) in one folder & want to modify some properties like sender name, sender email etc with my custom values (else those fields values comes from original sender's values).

e.g. My code snippet
' ************************************************************ *********************
Const PR_SENDER_EMAIL_ADDRESS% = &HC1F001E
Const PR_SENDER_ENTRYID%=&HC190102

SafeMailItem.Fields(PR_SENDER_EMAIL_ADDRESS)=SomeValue
SafeMailItem.Fields(PR_SENDER_ENTRYID)=SomeValue
......
.....


' ************************************************************ *********************

It is working perfectly, but on some computers I am getting error on
SafeMailItem.Fields(PR_SENDER_ENTRYID)=SomeValue

So I thought that I would check whether this field exists on that machine or not. So again I modified my code like this -
if SafeMailItem.Fields(PR_SENDER_ENTRYID) is nothing then
SafeMailItem.Fields.add(PR_SENDER_ENTRYID) <----- It gives me error
end if

In "outlook spy" I saw its type is PT_BINARY. How should I add the property PR_SENDER_ENTRYID with binary value?
Again another question is how can on some machine, Sender's entryid be nothing??!!


Thanks in advance,

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fields Collection Bill Microsoft Access Reports 2 24th Jun 2007 09:21 PM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Øyvind Isaksen Microsoft ASP .NET 1 18th May 2007 10:24 AM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Øyvind Isaksen Microsoft Dot NET 1 18th May 2007 10:24 AM
Adding Fields property DecimalPlaces using the fields collection jeff Microsoft Access VBA Modules 9 16th Jan 2007 11:57 AM
ADO Fields collection =?Utf-8?B?U2ltb25X?= Microsoft Access VBA Modules 1 26th Oct 2006 08:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:43 PM.