Microsoft Office Forums Why would GetObject(, "Outlook.Application") fail?

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 11-22-2019, 12:54 PM
BobBridges's Avatar
BobBridges BobBridges is offline Why would GetObject(, "Outlook.Application") fail? Windows 7 64bit Why would GetObject(, "Outlook.Application") fail? Office 2010 32bit
Why would GetObject(, "Outlook.Application") fail?
Join Date: May 2013
Location: USA
Posts: 620
BobBridges will become famous soon enoughBobBridges will become famous soon enough
Default Why would GetObject(, "Outlook.Application") fail?

I'm writing an Excel program to generate emails for a coworker. It works alright for me, but right at the beginning when he gets to

Set ool = GetObject(, "Outlook.Application") fails for him, "type mismatch" error. He's in Michigan, I'm in NC, so it's impractical for me to run over to his desk to see what's going on. He tells me a copy of Outlook ~is~ running. His Tools / References are the same as mine. I tried getting him to change that statement to

Set ool = CreateObject("Outlook.Application")

...but it just said it couldn't create the object.

I'm not sure even what questions to ask. What ~could~ cause it not to be able to find a copy of Outlook? I'm pretty well convinced that there is something basic I've misunderstood about GetObject and/or CreatObject that would clear this up for me, but I can't see what it might be.
Reply With Quote
Old 11-23-2019, 01:33 AM
gmayor's Avatar
gmayor gmayor is offline Why would GetObject(, "Outlook.Application") fail? Windows 10 Why would GetObject(, "Outlook.Application") fail? Office 2016
Join Date: Aug 2014
Posts: 3,023
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice

As a rule of thumb, it is preferable to use the function at Test if Outlook is open and open Outlook with VBA to open Outlook, whether it is running or not, however presumably your co-worker has defined ool as an Object?
Dim ool as Object
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why would GetObject(, "Outlook.Application") fail? Outlook: Hyperlink shows "Microsoft Office" files not "ALL" Elly26 Outlook 5 02-22-2016 02:11 PM
Need help with conditional formatting & returning "Pass" / "Fail Results" in a Column N mikey386 Excel 2 12-11-2014 01:14 PM
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas jocke321 Word VBA 2 12-10-2014 11:27 AM
Why would GetObject(, "Outlook.Application") fail? How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
"Microsoft Excel Application" missing in the "Component Services" on win08 Excel 0 02-26-2010 02:09 PM

All times are GMT -7. The time now is 11:53 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd. is not affiliated with Microsoft