Outlook Automation - VBA and VB6 - Microsoft Community


frineds, 

i facing issue during outlook automation.

i have lagacy application developed in vb6 , works , maintain application. application installed in windows 10 (64 bit) , outlook 2013 (32 bit) face a 

peculiar proble. 

the application not identify running outlook session @ all. checked test code shown below

vb6 code

private sub command1_click()

dim objoutlook object

on error resume next

set objoutlook = getobject(, "outlook.application")

if err.number = 429 then
    err.clear
    msgbox "please start outlook before starting application", vbcritical
    set objoutlook = nothing
    unload me
    exit sub
else
    set objoutlook = nothing
end if

end sub

it returns error 429 when outlook running. when open outlook admin getobject identify running instance of outlook.  why so? 

to test further, tried above code in excel vba. there getobject identifies outlook. not identify outlook opened admin. 

the same code works opposite in vb6 , vba. dont understand why.

please me. desperate fix.

***post moved moderator appropriate forum category.***



Office / Outlook / Microsoft Office Programming / Office 2013



Comments

Popular posts from this blog

Can't Sign-in to OneDrive - Microsoft Community

Shared mailbox permissions - Microsoft Community

Outlook 2016 for Mac - Multiple Issues, Error 17884 - Microsoft Community