What I did was to compare the items with this code:
The result gave me the SentOn time and Subject for the reply email when it
read from the http server, but the SentOn and Subject for the original email
from the default Outlook folder. It also read the Senton time in seconds, so
I suspect it would equate them if it was reading the right time.
Sub CompareItem(item1 As Object, item2 As Object)
'handles for manipulated objects
'Dim app As Outlook.Application
'Dim space As NameSpace
'Dim box1 As MAPIFolder
'Dim box2 As MAPIFolder
'Dim folder1 As MAPIFolder
'Dim folder2 As MAPIFolder
'Dim itemcoll1 As Items
'Dim itemcoll2 As Items
'Dim item1 As Object
'Dim item2 As Object
'Dim itemCopy As Object
Dim outputstr As String
'define the handles
'Set app = CreateObject("Outlook.Application")
'Set space = app.GetNamespace("MAPI")
'Set box1 = space.Folders("Mailbox - Kumana, Rayomand")
'Set folder1 = box1.Folders("Test")
''Set box2 = space.Folders("Test2")
'Set folder2 = box2.Folders("Mail2")
'Set itemcoll1 = folder1.Items
'Set itemcoll2 = folder2.Items
'Set item1 = itemcoll1(1)
'Set item2 = itemcoll1(2)
outputstr = outputstr & item1.SentOn & vbTab & item2.SentOn & vbTab & vbTab
If item1.SentOn = item2.SentOn Then
outputstr = outputstr & "Yes"
Else
outputstr = outputstr & "No"
End If
outputstr = outputstr & vbCrLf & item1.Subject & vbTab & item2.Subject &
vbTab & vbTab
If item1.Subject = item2.Subject Then
outputstr = outputstr & "Yes"
Else
outputstr = outputstr & "No"
End If
MsgBox outputstr, vbOKOnly, "Test Info"
End Sub
"Dmitry Streblechenko" wrote:
I doubt it is possible.
Have you tried to modify the line
If item1.SentOn = item2.SentOn Then
to something like
If Abs(item1.SentOn, item2.SentOn) 1/24/60/60 Then
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Rayo K" wrote in message
...
I have found something. The problem seems to be with emails that are
replies
or Fwds. In one case the SentOn and Subject properties return those of the
reply or forward, and in the other they return the properties of the
original
email.
Now, how do I specify that the property should be from the reply/forward?
"Dmitry Streblechenko" wrote:
Please show your code. Are you sure the date/time properties are the
same?
Due to the roundoff errors, you should never expect an exact match, but
rather check that the difference between two values is less than some
value
(e.g. millisecond).
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Rayo K" wrote in message
...
Hello,
I have a macro that is supposed to check my HTTP MSN acount for any
sent
emails that are not already in my OUtlook folder "Sent Items". I
compare
them
by checking the sent time and subject. However, the code seems to treat
the
properties as 'not equal' even when it's the same email. Is there
something
about being on a HTTP server that affects the item properties such that
they
will evaluate as not equal?