Re: Is there any way to get the Outlook State Answered?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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" <info@xxxxxxxxxxxxxxxx> wrote in message news:1624f88f.0504140322.4c6a245c@xxxxxxxxxxxxxxxxxxxxx
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

.



Relevant Pages

  • Re: Is there any way to get the Outlook State Answered?
    ... > First of all you need to create and log into the MAPI Session object. ... > logon, or with a piggy-back logon to an existing Outlook session. ... > Starting the event sink can be complicated and requires that you have the ... >> Dim objFolder As MAPI.Folder ...
    (microsoft.public.exchange.development)
  • Re: Windows logoff bug possible security vulnerability and exploit.
    ... To reproduce the problem, I just use the computer normally, and at each logon check the event viewer and running processes to see if a profile unload failed. ... I find that if I wait for a little bit after logging off before logging on again, no running programs from the previous logon are present, but if I log on just after logging off, they will be if the profile unload fails. ... When logging on, the first logged on user is given session ID 0, as shown in task manager, but if I 'switch' to another user, the user is given a different session ID. ... A few moments ago I logged in as administrator to do some minor changes, and I ran EPIM to take some notes of things. ...
    (Bugtraq)
  • Re: Question about Home PC connected to SBS via VPN....
    ... it is far easier to address this idea if you use an RDP ... session to gain control of the PC at your office, or use a TS Apps server to ... the time you first authenticated and logon at the local machine. ... SBS in the manner that your PC at home first builds the VPN before beginning ...
    (microsoft.public.windows.server.sbs)
  • Re: Modified logon control script
    ... your use of the InStr function is incorrect. ... I would suggest running the script at a command prompt ... > after logon to troubleshoot. ... >> Dim fso, f1, WshShell, argu, alllog, lastlog ...
    (microsoft.public.windows.server.scripting)
  • Re: Question about Home PC connected to SBS via VPN....
    ... Outlook E-Mail, then using RWW for my other needs. ... > session to gain control of the PC at your office, or use a TS Apps server to ... Making the remote link is easier with RWW than creating a VPN and ... > the time you first authenticated and logon at the local machine. ...
    (microsoft.public.windows.server.sbs)