MS Outlook ComObjActive Error: 0x800401E3

Get help with using AutoHotkey and its commands and hotkeys
paik1002
Posts: 355
Joined: 28 Nov 2015, 02:45

MS Outlook ComObjActive Error: 0x800401E3

07 May 2020, 20:06

Error: 0x800401E3

I am getting this error pointing to the code,

objOutlook := ComObjActive("Outlook.Application")

The code worked in 64 bit Windows 7, but stopped working in 64 bit Windows 10.

-64 bit Windows 10
-AHK running in admin mode
-AHK startup at (\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run)
-64 bit MS Outlook 2010 running NOT in admin mode

Your kind help would be appreciated.
GEV
Posts: 844
Joined: 25 Feb 2014, 00:50

Re: MS Outlook ComObjActive Error: 0x800401E3

08 May 2020, 02:13

Code: Select all

try objOutlook := ComObjActive("Outlook.Application")
See also Dealing with COM errors.
paik1002
Posts: 355
Joined: 28 Nov 2015, 02:45

Re: MS Outlook ComObjActive Error: 0x800401E3

19 May 2020, 19:46

GEV wrote:
08 May 2020, 02:13

Code: Select all

try objOutlook := ComObjActive("Outlook.Application")
See also Dealing with COM errors.
try
{
objOutlook := ComObjActive("Outlook.Application")
msgbox "try"
}
catch
{
msgbox "catch"
}

GEV, runing this code outputs "catch".

I am stuck not able to use ComObjActive, ComObjCreate, or any other COMs for Outlook.

objOutlook := ComObjCreate("Outlook.Application") --> Error: 0x80080005
objOutlook := ComObjActive("Outlook.Application") --> Error: 0x800401E3

try/catch does not seem to solve these errors.

Help would be appreciated.
swagfag
Posts: 3920
Joined: 11 Jan 2017, 17:59

Re: MS Outlook ComObjActive Error: 0x800401E3

19 May 2020, 20:07

ull probably have to run everything as admin or none of it, no mismatching
then retry a bunch of times until u manage to open the COM handle(or not):

Code: Select all

maxTries := 5
i := 0
retry:
try
{
	excel := ComObjActive("Outlook.Application")
}
catch 
{
	if (i < maxTries)
	{
		++i
		Sleep 10000
		goto retry
	}
	else
	{
		MsgBox doesnt work
		ExitApp
	}
}

Return to “Ask For Help”

Who is online

Users browsing this forum: AHKStudent, Epialis, frankr, Jstenoien, littlegandhi1199 and 69 guests