Re: Find Filter Problems

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



See if it works if you use a range test and not equality. Testing any date/time value for equality might always fail due to conversions from UTC to local time and rounding errors. Maybe test for a range of plus or minus a minute or two.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"sburr" <sburr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:753DD826-6E70-4281-A43D-BADDDF532D23@xxxxxxxxxxxxxxxx
The items are not being dropped into Outlook: Outlook is the source of the
drag-and-drop operation, while my custom application is the target.

That said, I'm actually also doing what you're suggesting as a second method
of communicating with Outlook. I snag a reference to the Items collection of
the Inbox folder and watch messages as they arrive, handling the AddItem
method as they do. In this case, I don't need to disambiguate because I get a
referece to the actual Item itself in my event handler.

Back to drag and drop. As for using [ReceivedTime] in my filter expression,
yes, I tried to study the examples. I pared it down to just the very basics:

sReceived = Format("8/21/2007 3:27:38 AM", "ddddd h:nn AMPM")
Set itm = itms.Find("[ReceivedTime] = '" & sReceived & "'")

where the timestamp is literally what I get from Item.ReceivedTime, and the
the format expression is taken directly from the online docs and strips off
the seconds. Still, this search returns a null reference.

Any ideas?

.



Relevant Pages

  • Re: performance of HashSet with strings and integers
    ... whose hash code is equal to the probe's hash code but that is not the ... and so the equals test is fast. ... mismatch or reference equality prevents execution of the equals call. ...
    (comp.lang.java.programmer)
  • Re: Question about "Contains" method
    ... 'Contains' method internally uses Equals method to compare the ... For reference types, equality is defined as ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Object equals
    ... I was under the impression that o.equals compares content. ... The default implementation of Equals supports reference equality only, but derived classes can override this method to support value equality. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: An oddity in list comparison and element assignment
    ... #> equality so that a and b remain equivalent under parallel mutations ... I'm starting to wonder if by Michaels' requirement ANY ...
    (comp.lang.python)