View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Why does Outlook.Application.GetNamespace("MAPI") Fail?

Set NS = Application.GetObject("Outlook.Application").GetNa mespace("MAPI")

Would be more what your are looking for. This would require Outlook to be
running at the time.

If it isn't running, use CreateObject instead. See VBA help on GetObject
and CreateObject for examples and explanations.

--
Regards,
Tom Ogilvy

"Lee" wrote in message
...
Can anyone point me in the direction as to why the following fails?

Set NS = Outlook.Application.GetNamespace("MAPI")

It is done on a server that only has outlook and exel installed (Excel is
the full instlal, outlook is only partially).
--
-Lee