473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

outlook automation

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()
Jul 21 '05 #1
1 1279
I have a guess about what is happening.

There's an anti-virus check that brings up a popup when a program tries to
access the address book, and IIRC, accessing the "To" field triggers that
test. If you're running as an ASP process, I think that causes a block.

I'd suggest going to http://www.asp.net and asking on the forums there.

--
Eric Gunnerson

Visit the C# product team at http://www.csharp.net
Eric's blog is at http://blogs.gotdotnet.com/ericgu/

This posting is provided "AS IS" with no warranties, and confers no rights.
"Frank" <fr**********@hotmail.com> wrote in message
news:35****************************@phx.gbl...
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()

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: MLH | last post by:
Is the following remotely correct? =DDE("C:\Program Files\Program Files\Outlook Express\OEmig50","Attachment","Name") I'm not sure that OEmig50.exe is the executable for OE. Anybody know? ...
2
by: Lauren Quantrell | last post by:
Using Outlook Automation, is there a way to insert a graphic in the body of an e-mail so that it appears at the top of an email? lq
10
by: John | last post by:
Hi When I open a new outlook email from vb.net, sometimes outlook is very slow to appear or occasionally outlook freezes completely. I am targeting mixed office2000/xp environments so I am...
14
by: Gerhard | last post by:
I'm posting this again, as no answer to the first post.... I would like to integrate Outlook into my vb.net web page, so that when I send an email (which I can successfully do now), it shows up...
26
by: Tom Becker | last post by:
Is there a way, from Access, to programmatically click the Send and Receive button in Outlook?
5
by: Arno R | last post by:
Hi all, I need to get at specific (shared) agenda-data from MS outlook 2003. I need every day to get the scheduled 'appointments' for some rooms to Access. In Access I will show the...
0
by: salad | last post by:
I'm on A97 and have Outlook 2003 on the computer. There's some generic code at Tony Toew's site and at MS and on the web that's very similar....but I can't make it work. I want to use late...
1
by: =?Utf-8?B?cm9i?= | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
1
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
0
by: madihamir | last post by:
Iam new to .net and have gotten assignment for make the class library to automate the outlook I have tried to done it but i've to make the Handlers also . Detecting an methods for receiving and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.