|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Is there any way to get the Outlook State Answered?Hello,
i'm now developing on an onTimer Eventsink which check the Inbox for "Not Answered" Mails on an Exchange Server 2003. How will i get the status of the mails in der Inbox? I only find the state "read" or "unread". can anybody help me? best regards Florian Only a suggestion (don't know if it's possible):
Check the MAPI property tags. (e.g. 0x47110815) There should exist a property - readable also through ADO Record - that holds the 'outlook read flag'. You can use http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_viewing_mapi_properties.asp as a start to gain information. > mails in der Inbox? Grüße aus StuttgartMario Show quote "Florian Endres" <i***@florianendres.de> schrieb im Newsbeitrag news:1624f88f.0504122218.16487768@posting.google.com... > Hello, > > i'm now developing on an onTimer Eventsink which check the Inbox for > "Not Answered" Mails on an Exchange Server 2003. > > How will i get the status of the mails in der Inbox? > > I only find the state "read" or "unread". > > > can anybody help me? > > > best regards > Florian The property that can be used to see if an item was replied to or forwarded
would be PR_LAST_VERB_EXECUTED (0x10810003). EXCHIVERB_REPLYTOALL = 103 EXCHIVERB_REPLYTOSENDER = 102 EXCHIVERB_FORWARD = 104 That, combined with PR_MESSAGE_FLAGS (0x10960003) can be used to see what's what. PR_MESSAGE_FLAGS will have bit 0 set for a message that has been read, it will be 0 for an unread item. -- Show quoteKen 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 "Mario Kropik" <mario.kro***@nt-solutions.de> wrote in message news:d3ipj0$gk6$05$1@news.t-online.com... > Only a suggestion (don't know if it's possible): > > Check the MAPI property tags. (e.g. 0x47110815) > There should exist a property - readable also through ADO Record - that > holds the 'outlook read flag'. > > You can use > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_viewing_mapi_properties.asp > as a start to gain information. > >> mails in der Inbox? > Grüße aus Stuttgart > > Mario hello again.
this is my coding. looks very nice but the eventsink won`t start. im searching the web for debbuging the com+ application but every result i found don't work. The absolute coding was done by the event sink wizard, the coding between the brakets is mine. the event sink was registered with the exchange explorer. ************** Private Sub IExStoreSystemEvents_OnTimer(ByVal bstrURLItem As String, ByVal lFlags As Long) '{ Dim objSession As Session Dim objFolder As MAPI.Folder Dim objMessages As MAPI.Messages Dim objMessage As MAPI.Message Dim objFields As MAPI.Fields ' MAPI property tags used Const PR_LAST_VERB_EXECUTED = &H10810003 ' Constants for Reply actions Const ACTION_REPLY_ALL = 261 Const ACTION_FORWARD = 262 ' Get inbox Set objFolder = objSession.Inbox ' Get first message Set objMessage = objFolder.Messages.GetFirst ' Get fields collection Set objFields = objMessage.Fields If objFields.Item(PR_LAST_VERB_EXECUTED) <> ACTION_REPLY Or _ objFields.Item(PR_LAST_VERB_EXECUTED) <> ACTION_FORWARD Then 'Write to the log file that this event has been called.'} Call EventLog("TEST", bstrURLItem, lFlags) '{ End If '} It's only a part, not the complete coding. how can i debug this s**t in Visual Studio 6 on an Exchange Server 2003? thanks Florian ############################################################################### Show quote "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in message news:<#m$rHkCQFHA.576@TK2MSFTNGP15.phx.gbl>... > The property that can be used to see if an item was replied to or forwarded > would be PR_LAST_VERB_EXECUTED (0x10810003). > > EXCHIVERB_REPLYTOALL = 103 > EXCHIVERB_REPLYTOSENDER = 102 > EXCHIVERB_FORWARD = 104 > > That, combined with PR_MESSAGE_FLAGS (0x10960003) can be used to see what's > what. PR_MESSAGE_FLAGS will have bit 0 set for a message that has been read, > it will be 0 for an unread item. > > -- > 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 > > > "Mario Kropik" <mario.kro***@nt-solutions.de> wrote in message > news:d3ipj0$gk6$05$1@news.t-online.com... > > Only a suggestion (don't know if it's possible): > > > > Check the MAPI property tags. (e.g. 0x47110815) > > There should exist a property - readable also through ADO Record - that > > holds the 'outlook read flag'. > > > > You can use > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_viewing_mapi_properties.asp > > as a start to gain information. > > > >> mails in der Inbox? > > Grüße aus Stuttgart > > > > Mario First of all you need to create and log into the MAPI Session object. That's
required. Set objSession = CreateObject("MAPI.Session") The Logon method must use one of a few ways to log on, either with profile + password, with a prompt for that information, with a dynamically created logon, or with a piggy-back logon to an existing Outlook session. See the various logon samples at www.cdolive.com/cdo5.htm for examples of different logon methods. Second, the last verb executed property isn't always there. So you have to account for the property possibly not existing. An error trap for that after setting the property to a MAPI.Field object would do that. Starting the event sink can be complicated and requires that you have the proper permissions to register the sink and the proper identity for the sink when it runs. Look in the Exchange SDK and in the MSDN library for more information on that. -- Show quoteKen 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 "Florian Endres" <i***@florianendres.de> wrote in message news:1624f88f.0504140322.4c6a245c@posting.google.com... > hello again. > > this is my coding. looks very nice but the eventsink won`t start. im > searching the web for debbuging the com+ application but every result > i found don't work. > > The absolute coding was done by the event sink wizard, the coding > between the brakets is mine. > > the event sink was registered with the exchange explorer. > > > > ************** > Private Sub IExStoreSystemEvents_OnTimer(ByVal bstrURLItem As String, > ByVal lFlags As Long) > '{ > Dim objSession As Session > Dim objFolder As MAPI.Folder > Dim objMessages As MAPI.Messages > Dim objMessage As MAPI.Message > Dim objFields As MAPI.Fields > > ' MAPI property tags used > Const PR_LAST_VERB_EXECUTED = &H10810003 > > ' Constants for Reply actions > Const ACTION_REPLY_ALL = 261 > Const ACTION_FORWARD = 262 > > ' Get inbox > Set objFolder = objSession.Inbox > > ' Get first message > Set objMessage = objFolder.Messages.GetFirst > > ' Get fields collection > Set objFields = objMessage.Fields > > If objFields.Item(PR_LAST_VERB_EXECUTED) <> ACTION_REPLY Or _ > objFields.Item(PR_LAST_VERB_EXECUTED) <> ACTION_FORWARD Then > > 'Write to the log file that this event has been called.'} > Call EventLog("TEST", bstrURLItem, lFlags) > > '{ > End If > '} > > It's only a part, not the complete coding. > > how can i debug this s**t in Visual Studio 6 on an Exchange Server > 2003? > > thanks > Florian Hello again.
my errorlog said "MAPI_E_NOT_FOUND" looping through the messages in the inbox. The proberty tag "CdoPR_ACTION_FLAG" (&H10810003) must be in the message properties or not. Show quote "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in message news:<eVrMTRPQFHA.3140@tk2msftngp13.phx.gbl>... > First of all you need to create and log into the MAPI Session object. That's > required. > > Set objSession = CreateObject("MAPI.Session") > > The Logon method must use one of a few ways to log on, either with profile + > password, with a prompt for that information, with a dynamically created > logon, or with a piggy-back logon to an existing Outlook session. See the > various logon samples at www.cdolive.com/cdo5.htm for examples of different > logon methods. > > Second, the last verb executed property isn't always there. So you have to > account for the property possibly not existing. An error trap for that after > setting the property to a MAPI.Field object would do that. > > Starting the event sink can be complicated and requires that you have the > proper permissions to register the sink and the proper identity for the sink > when it runs. Look in the Exchange SDK and in the MSDN library for more > information on that. > > -- > 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 > > > "Florian Endres" <i***@florianendres.de> wrote in message > news:1624f88f.0504140322.4c6a245c@posting.google.com... > > hello again. > > > > this is my coding. looks very nice but the eventsink won`t start. im > > searching the web for debbuging the com+ application but every result > > i found don't work. > > > > The absolute coding was done by the event sink wizard, the coding > > between the brakets is mine. > > > > the event sink was registered with the exchange explorer. > > > > > > > > ************** > > Private Sub IExStoreSystemEvents_OnTimer(ByVal bstrURLItem As String, > > ByVal lFlags As Long) > > '{ > > Dim objSession As Session > > Dim objFolder As MAPI.Folder > > Dim objMessages As MAPI.Messages > > Dim objMessage As MAPI.Message > > Dim objFields As MAPI.Fields > > > > ' MAPI property tags used > > Const PR_LAST_VERB_EXECUTED = &H10810003 > > > > ' Constants for Reply actions > > Const ACTION_REPLY_ALL = 261 > > Const ACTION_FORWARD = 262 > > > > ' Get inbox > > Set objFolder = objSession.Inbox > > > > ' Get first message > > Set objMessage = objFolder.Messages.GetFirst > > > > ' Get fields collection > > Set objFields = objMessage.Fields > > > > If objFields.Item(PR_LAST_VERB_EXECUTED) <> ACTION_REPLY Or _ > > objFields.Item(PR_LAST_VERB_EXECUTED) <> ACTION_FORWARD Then > > > > 'Write to the log file that this event has been called.'} > > Call EventLog("TEST", bstrURLItem, lFlags) > > > > '{ > > End If > > '} > > > > It's only a part, not the complete coding. > > > > how can i debug this s**t in Visual Studio 6 on an Exchange Server > > 2003? > > > > thanks > > Florian PR_LAST_VERB_EXECUTED is not necessarily there, it's added to a mail item
when one of the appropriate actions is taken (reply, forward, etc.). If it's not there you either must be prepared to handle the error or set a Field property on that property and check for it being Nothing. There are a lot of MAPI properties that don't exist on items unless the property is added or an action is taken that creates that property. You have to be aware of that in all coding of this type. -- Show quoteKen 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 "Florian Endres" <i***@florianendres.de> wrote in message news:1624f88f.0504250442.d60cc29@posting.google.com... > Hello again. > > my errorlog said "MAPI_E_NOT_FOUND" looping through the messages in > the inbox. > > The proberty tag "CdoPR_ACTION_FLAG" (&H10810003) must be in the > message properties or not. |
|||||||||||||||||||||||