473,546 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ 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 1056
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, .outputdatarece ived , .errordatarecei ved ) but i dont think those will be of use, since when the process has exited, the event would be raised =/

2) in the processstartinf o, 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
4978
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 Outlook application (and/or Calendar) may or may not be open when this sub runs.
4
17457
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 address is selected, populate an Access field with the address. Is this remotely possible? Thanks, lq
6
3535
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 open? Thanks Dim objOutlook As New Outlook.Application Dim objMail As Outlook._MailItem =...
3
8683
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 program to also send an email that the process has been completed. The PC's are set up to use outlook profiles. When a user logs into our 2000...
3
5791
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 installed on something other than the "C" drive. So can anyone advise me how to open Outlook by using a relative path rather than the code I am using...
7
6796
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 Inbox As Outlook.MAPIFolder Dim InboxItems As Outlook.Items Dim Mailobject As Object Set OlApp = CreateObject("Outlook.Application")
0
1382
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 address I'm 1) loading the mshsrch.oss field into a variable, 2) replacing the email address with the one that is clicked on, 3) pushing the file out...
9
2237
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 objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim objOutlookAttach As Outlook.Attachment Set objOutlook =...
23
5937
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
7504
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7694
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7461
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6026
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5080
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.