changed EntryID

  • Thread starter Peter Ramsebner
  • Start date
P

Peter Ramsebner

Hi all,

i'm logging outgoing mail messages in a external database (sql server). One
of the saved data is the EntryID of a message.
To log the messages i use 'ThisOutlookSession'.
Because of the fact that new messages doesn't have an EntryID first i have
to save the message...

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Item.Save
Debug.Print Item.EntryID

Exit Sub


--> The Problem is, that this EntryID is not the EntryID you will see
later!!!
Outlook is changing the EntryID!

1) But why?

2) What can i do to get the right EntryID?


Thanks,

Peter
 
S

Sue Mosher [MVP-Outlook]

Try logging when new items hit the Sent Items folder, rather than with
ItemSend.
 
S

Sue Mosher [MVP-Outlook]

See http://www.outlookcode.com/codedetail.aspx?id=456 for a sample
demonstrates how to monitor the Sent Items folder and display the Categories
dialog for each item sent (Outlook 2002 or later only). You could use the
same framework to perform other operations on the sent messages.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
P

Peter Ramsebner

But not with Outlook 2000?


Sue Mosher said:
See http://www.outlookcode.com/codedetail.aspx?id=456 for a sample
demonstrates how to monitor the Sent Items folder and display the Categories
dialog for each item sent (Outlook 2002 or later only). You could use the
same framework to perform other operations on the sent messages.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Versions earlier than 2002 do not provide a way to display the Categories
dialog

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
P

Peter Ramsebner

Thank you Sue, now it works

Peter


Sue Mosher said:
See http://www.outlookcode.com/codedetail.aspx?id=456 for a sample
demonstrates how to monitor the Sent Items folder and display the Categories
dialog for each item sent (Outlook 2002 or later only). You could use the
same framework to perform other operations on the sent messages.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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