#1
|
||||
|
||||
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") ...it 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. |
#2
|
||||
|
||||
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?
Code:
Dim ool as Object
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
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 | sword.fish | Excel | 0 | 02-26-2010 02:09 PM |