vba - Automation Error when GetObject Outlook from Excel -


i'm writing vba code in excel send outlook mail based on information in excel file. ok, works on computer , others. there's 1 computer got error when getobject outlook application.

the error "automation error"

the code looks this:

dim olapp outlook.application dim oltask outlook.taskitem  on error resume next 'check if outlook running - **the code stopped here** set olapp = getobject("outlook.application") if err <> 0     'if not running, start     set olapp = createobject("outlook.application") end if  set oltask = olapp.createitem(oltaskitem) 

make sure reference set

microsoft outlook object library

microsoft word object library

microsoft excel object library

enter image description here

set fso = createobject("scripting.filesystemobject") 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -