Verify the type of mail being sent

D

Duran

i have written a piece of code to determine whether all the address entries
in the mail are going to specific domains like eg @mydomain.com. I am
checking whether the domain in mydomain. But when i am replying to calending
invite, the code is throwing an error 'Object type mismatch'.

for All types of outlook items i should do the procesing and should send it
based on the succes. but i am unable to accomplish because of the above
error. Please help me in resolving this
 
K

Ken Slovak - [MVP - Outlook]

No way to tell what's going on without knowing what your code is doing. Are
you perhaps assuming that all those items are MailItem types and therefore
getting an error on appointment and task type messages? If that's the case
then test the Class or MessageClass of the object before assigning it to a
MailItem type.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top