jasonkneen
asked on
Can't invoke createobject("outlook.application") unless I use createobject("outlook.application","localhost")
I have a new laptop and am having a problem I didn't have previously.
Within a custom form I'm trying
Set oOutlook = createobject("outlook.appl ication")
and it generates an exception.
If I change it to
Set oOutlook = createobject("outlook.appl ication"," localhost" )
it works.
I've never had to do this before on other machines.
I get a similar problem with VB6. If I add in the Outlook 11 library and try
set oOutlook = new Outlook.application
I get an error
If I change it to
set oOutlook = createobject("outlook.appl ication"," localhost" )
It works.
Within a custom form I'm trying
Set oOutlook = createobject("outlook.appl
and it generates an exception.
If I change it to
Set oOutlook = createobject("outlook.appl
it works.
I've never had to do this before on other machines.
I get a similar problem with VB6. If I add in the Outlook 11 library and try
set oOutlook = new Outlook.application
I get an error
If I change it to
set oOutlook = createobject("outlook.appl
It works.
Hello jasonkneen,
this could've to do with a script blocker in AV software which requires explicit direction [localhost in this case] to the on the caller of create object
hope this helps a bit
bruintje
this could've to do with a script blocker in AV software which requires explicit direction [localhost in this case] to the on the caller of create object
hope this helps a bit
bruintje
ASKER
I've solved this. The solution was to uninstall office then reinstall - repair did not work.
I'm not sure what the exact problem but it sounds like Outlook wasn't registered properly as an application server. Invoking "word.application" worked but outlook wouldn't unless the "localhost" server was specified.
Not only is my script problem solved but google desktop now shows outlook messages, something it didn't do before so as I thought - the two issues were linked.
Anyway, solution is complete reinstall of office!
Jason
I'm not sure what the exact problem but it sounds like Outlook wasn't registered properly as an application server. Invoking "word.application" worked but outlook wouldn't unless the "localhost" server was specified.
Not only is my script problem solved but google desktop now shows outlook messages, something it didn't do before so as I thought - the two issues were linked.
Anyway, solution is complete reinstall of office!
Jason
glad you solved it :)
after reading your comment it looks like a registry issue indeed, would be interesting to kn ow when it started happening maybe an update or something
after reading your comment it looks like a registry issue indeed, would be interesting to kn ow when it started happening maybe an update or something
paq and refund
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/questions/21528470/Open-Outlook-by-Shell-or-Outlook-object-model.html?query=vb6+createobject+outlook&clearTAFilter=true
https://www.experts-exchange.com/questions/20227775/Utilizing-MS-Outlook-from-a-VB6-app.html?query=vb6+createobject+outlook&clearTAFilter=true
https://www.experts-exchange.com/questions/10297151/Creating-an-email-message-using-VB6.html?query=vb6+createobject+outlook&clearTAFilter=true
https://www.experts-exchange.com/questions/11055203/Customize-MS-Outlook-2000.html?query=vb6+createobject+outlook&clearTAFilter=true
https://www.experts-exchange.com/questions/21630897/get-an-outlook-or-excel-com-object-from-the-other.html?query=vb6+createobject+outlook&clearTAFilter=true
https://www.experts-exchange.com/questions/20177135/Outlook-2002-Journal-Entry.html?query=vb6+createobject+outlook&clearTAFilter=true