Integer data type missing on VSTO for Outlook 2003

We use custom fields in Outlook (user properties)
One of these is called ScanID which is Integer data type.
We use both Outlook 2003 and Outlook 2007.
For the Outlook 2007 VSTO project, the below line works fine

Mail1.UserProperties.Add("ScanID", Outlook.OlUserPropertyType.olInteger)

ForOutlook 2003, the interop assembly doesn't seem to have olInteger property. I can use olNumber as data type but then that causes an error such as:
"A custom field with this name but a different data type already exists. Enter a different name."

I know Outlook 2003 supports this data type because I can add a new field using Outlook's GUI and specify Integer. Why doesn't it recognise it in VSTO?
LVL 3
Billy_LondonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Miguel OzSoftware EngineerCommented:
The  OlUserPropertyType enumerator is defined at Microsoft.Office.Interop.Outlook (in microsoft.office.interop.outlook.dll)
Version 11 does not contain this enumerator value but version 12 does, it is a limitation of the assembly itself. Unfortuantely this feature has not been surfaced for Interop in Outlook 2003.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Billy_LondonAuthor Commented:
i'll have to work around this with some error-checking instead. When it throws up the error after trying to create olNumber user property type, it still creates the user property, but sets it to zero.
Microsoft won't help on this unless I pay them because it's not supported any more so s*d them!

i'll use something like below

            On Error Resume Next
            Mail1.UserProperties.Add("ScanID", Outlook.OlUserPropertyType.olNumber)
            On Error GoTo ErrorTrap
            Mail1.UserProperties("ScanID").Value = 12345
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.