F
Frank
Hello,
I am writing an application in vb.net that iterates
through the sent items folder of a mailbox. Everything
works fine until the application tries to access the "TO"
field of the message, there are no errors, however on the
box that application is running, cpu usage goes to 0% for
both the outlook session and the aspnet_wp.exe session.
This application creates a datatable and a populates a
datagrid as well as writing the dataset to an xml file.
When the "TO" properties are remarked out it works fine.
Any suggestions?
Thanks,
Frank
code follows:
For i = 1 To ticketclosed.Count
msg = SF.Items.Item(i)
If msg.SentOn.Date _
< Date.Today.AddDays(-7) _
Then GoTo SkipOverIfs
If msg.SentOn.Date > _
Date.Today.AddDays(-7) _
Then
newmail = Smail.NewRow
newmail.Item("Index") = i
'newmail.Item("To") = _
'msg.To.ToString
newmail.Item("Date Sent") _
= msg.SentOn.ToShortDateString
newmail.Item("Subject") = msg.Subject
newmail.Item("Body") = msg.Body
Smail.Rows.Add(newmail)
End If
Next i
SkipOverIfs: ol.Quit()
I am writing an application in vb.net that iterates
through the sent items folder of a mailbox. Everything
works fine until the application tries to access the "TO"
field of the message, there are no errors, however on the
box that application is running, cpu usage goes to 0% for
both the outlook session and the aspnet_wp.exe session.
This application creates a datatable and a populates a
datagrid as well as writing the dataset to an xml file.
When the "TO" properties are remarked out it works fine.
Any suggestions?
Thanks,
Frank
code follows:
For i = 1 To ticketclosed.Count
msg = SF.Items.Item(i)
If msg.SentOn.Date _
< Date.Today.AddDays(-7) _
Then GoTo SkipOverIfs
If msg.SentOn.Date > _
Date.Today.AddDays(-7) _
Then
newmail = Smail.NewRow
newmail.Item("Index") = i
'newmail.Item("To") = _
'msg.To.ToString
newmail.Item("Date Sent") _
= msg.SentOn.ToShortDateString
newmail.Item("Subject") = msg.Subject
newmail.Item("Body") = msg.Body
Smail.Rows.Add(newmail)
End If
Next i
SkipOverIfs: ol.Quit()