Dan Waters
dwaters at usinternet.com
Mon Mar 7 09:52:26 CST 2005
Hi Doris, I use exactly what Andy is using, to my satisfaction. It works essentially like a Boolean value if Outlook is open or not, and won't close Outlook if it's open. If Outlook is closed the error code is 429 which you can trap. Dan Waters ProMation Systems -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mike & Doris Manning Sent: Monday, March 07, 2005 9:20 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Code to detect if Outlook is open Thanks, Andy, but that isn't quite what I was looking for. I had some API code I wrote for an AccessXP database that could detect whether Outlook was already open and process accordingly. I used API code because if Outlook was already open on the user's machine, I didn't want my code to close it. My old code used the EnumWindows process to look through the tabs but when I run it using Access2003, I don't get the same results. I was hoping someone had updated code. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey Sent: Monday, March 07, 2005 8:53 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Code to detect if Outlook is open Hi Doris I can't test it in A2003 but this works in earlier versions Dim objOutlook As Outlook.Application On Error GoTo Err_NoOutlook Set objOutlook = GetObject(, "Outlook.Application") If it errors then Outlook's not running. Any use? -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: Access Developers discussion and problem solving <accessd at databaseadvisors.com> To: 'Access Developers discussion and problem solving' <accessd at databaseadvisors.com> Subject: [AccessD] Code to detect if Outlook is open Date: 07/03/05 14:33 > > Does anyone have any code to detect if Outlook is open that works in > Access2003? > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > > > ________________________________________________ Message sent using UebiMiau 2.7.2 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com