You can check for IsEmpty() for fields that may not be there by default.
There are other verbs that could be there in the field, such as
EXCHIVERB_REPLYTOALL or EXCHIVERB_FORWARD , so check for a value of 102.
EXCHIVERB_REPLYTOALL (103) is set if ReplyToAll was used last,
EXCHIVERB_FORWARD (104) is set if Forward was used last.
The value will change as different actions are taken. If an item was replied
to the field value would be 102. If then you forwarded the same item it
would change to 104. The field only captures the last action taken.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Geoff" wrote in message
...
Hi Ken,
I'm making great progress thanks to your earlier help!
I have a couple of more questions, if I may.
Using VBA and CDO 1.21 in Outlook, I'm sending a MAPI.Fields collection
for an Outlook Mailitem to a function containing the following code:
Dim lngValue as Long
lngValue = &H10810003
Set objOneField = objMAPIFieldsColl.item(lngValue)
As you mentioned, if the Mailitem has been replied to, then
objOneField.Value is 102.
If the Mailitem has not been replied to, the last code line above
generates a run-time error.
My questions a
1. Am I right in assuming that the run-time error occurs because, when
a Mailitem has not been replied to, the field in question simply does not
exist? Can I trap the error and assume that the Mailitem has not been
replied to?
2. If a run-time error is not generated, I then get access to the
field. Do I have to ensure that its Value property is 102 before I can
assume that the Mailitem has been replied to? I'm wondering if the Value
property could contain other values that would mean other things.
Very many thanks for getting me this far.
Regards
Geoff