473,480 Members | 3,062 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I keep outlook open.

55 New Member
I have an application which emails out files periodically using Outlook,but if Outlook is closed the emails remain in the Outbox until Outlook is opened again.
How do I get Outlook to remain open until the Outbox is empty?
Need help
Expand|Select|Wrap|Line Numbers
  1. public void chkIF_There_Is_Mail()
  2.         {
  3.  
  4.             while (oOutboxFolder.Items.Count > 0)
  5.             {
  6.  
  7.                 Console.WriteLine("There are still Items in Outlook");
  8.             }
  9.             oApp.Quit();
  10.         }
Aug 29 '08 #1
3 1047
joedeene
583 Contributor
how about checking if outlook is open periodically, by searching for its process, and if it is closed, then tell them they need to open it, and also try to make something that keeps the outlook open, whenever they want to close it, like when i use outlook and msn, before i close outlook it says i have to close msn, because its using something from it, and please remember to use code tags...

joedeene
Aug 29 '08 #2
napstar
55 New Member
do you have any code for that?
Aug 29 '08 #3
joedeene
583 Contributor
ehh im not sure about an exact code or anything, but here are suggestions...

1) add a handler for one of the process' events which you started. (which are only 4, like .disposed, .exited, .outputdatareceived , .errordatareceived ) but i dont think those will be of use, since when the process has exited, the event would be raised =/

2) in the processstartinfo, try messing around with the .WindowStyle ? it didnt work for me when i tried starting Internet Explorer in hidden mode(or any of them for that matter), but try with your outlook if it doesnt have to be visible..

hope i helped...
joedeene
Aug 30 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4973
by: deko | last post by:
When adding Outlook Appointment Items from Access, should I use: Set ol = New Outlook.Application --or-- Set ol = CreateObject("Outlook.Application") Outlook seems to crash either way. The...
4
17450
by: lauren quantrell | last post by:
Is there a way to open the MS Outlook address book using VBA and then be able to do something with the return value? I want users to click an icon to open the Outlook address book then when an...
6
3529
by: Barkster | last post by:
I'm trying to send using outlook but I get an error on the directcast line if I don't have outlook open. Works fine if it is open. What do I need to do to be able to send without having outlook...
3
8682
by: Paul | last post by:
Hello, I am trying to set up a program that will email me when a process has been completed by a user. The user uses a program that moves some files, after these files are moved I want the...
3
5779
by: bobdydd | last post by:
Hi Everybody Access 2000, Outlook 2000 Windows XP I am running the code below to open Microsoft Outlook from a Command Button. It works fine until I tried it on a machine that has Office...
7
6775
by: Dean Spencer | last post by:
Can anyone help? I am importing Emails from Outlook using the following code: Public Function ScanInbox(SubjectLine As String) Dim TempRst As Recordset Dim OlApp As Outlook.Application Dim...
0
1373
by: Roark | last post by:
In outlook, I've setup an advanced search (Ctrl-Shift-F) and saved the search as msgsrch.oss. Next, I've uploaded this file to a field in my web sql server. In my web app, when I click on an email...
9
2235
by: ARC | last post by:
In case anyone has ran into this yet. The following code used to work with older versions of the MS Outlook library, but would error out in 2007: Dim objOutlook As Outlook.Application Dim...
23
5924
by: andyoye | last post by:
How can I launch Outlook on users machines when they click a button on a web form (InfoPath)? Thanks
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7060
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7022
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3004
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.