
How to create custom Field for emails programmatically
Hi Sue,
Thank you.
I tried your suggestion in the VB Editor attached to
Outlook 2000. Unfortunately, my code doesn't seem to work.
What I did was to send an email from a different account
which comes to the Inbox.
Here is the Inbox Item Add Handler.
============================
01 Private Sub objInboxItems_ItemAdd(ByVal Item As Object)
02 Debug.Print "hi there from objInboxItems_ItemAdd"
03 Dim myUserProperty As UserProperty
04
05 Set myUserProperty = Item.UserProperties _
06 .Add("Test", olNumber, True, RAWFORMAT)
07 Item.UserProperties(1).Value = "66"
08 Set Item = Nothing
09 End Sub
============================
Is it because
a) of "Set Item = Nothing" in Line 09 ?
b) I had already defined a Field called "Test" in the
Inbox folder.
P.S : I created a custom Mail form with a text item and
bound it to the custom field "Test". When I sent a mail to
myself using this form, I am able to see the Custom Field
values in my Inbox Folder.
Thank you very much for your inputs,
Best Regards,
ANJAN. B
Quote:
>-----Original Message-----
>Yes, the addin can use MailItem.UserProperties.Add to add
the property to an item you create in the Inbox. That
creates it in the folder as well. You then discard the
MailItem.
Quote:
>--
>Sue Mosher, Outlook MVP
> Outlook and Exchange Solutions
> at http://www.slipstick.com
Quote:
>> Hi,
>> Our Outlook solution requires a custom field that
will
>> be added to the users' "Inbox Folder" programatically.
>> Is it possible to have an outlook add-in which is
>> registered through InstallShield do the above ?
>> Thank you very much for any tips, pointers,
>> Best Regards,
>> ANJAN. B
>.