Re: MAPIInitialize failed and get an error message



The error is returned if Outlook is not your default mail client and the
default mail client does not support MAPI. There are two ways of getting
around this problem.

1.. Make Microsoft Outlook your default mail client.
2.. Or make an entry for you application under the path
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Messaging
Subsystem\\MSMapiApps" with the value set to "Microsoft Outlook". This will
divert all MAPI related calls to Outlook even if it is not the default mail
client.
Regards,
Huzaifa Kagazwala

"zhanglr" <zhanglr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3B1745A6-AF7F-4409-A9C3-162EA624FDBB@xxxxxxxxxxxxxxxx
Hi,

I get following error message when I call MAPIInitialize( NULL );
-- Either there is no default mail client or the current mail client
cannot
fulfill the messaging request. Please run Microsoft Office Outlook and set
it
as the default mail client.

BTW, my pc setting is:
OS is Vista.
IDE is Microsoft Visual Studio 2005
email client:
1) outlook 2003 (no default)
2) Windows mail (default email client) -- I manually set it as default
email client.
(1. Click to open Set Program Access and Computer Defaults.? If you are
prompted for an administrator password or confirmation, type the password
or
provide confirmation.
2. Under Choose a configuration, click Custom.
3. Under Choose a default e-mail program, click the e-mail program you'd
like to use, and then click OK.)

Best Regards,
Michael


.



Relevant Pages

  • Re: Getting Word to Use Outlook Express Address Book
    ... > - Not possible with Outlook running, have to use the Mail item under ... But no connection to an Exchange server is required. ... >> Wizard to function. ... >> default mail client not supporting the operation. ...
    (microsoft.public.access.externaldata)
  • Re: Cant Connect Word Mail Merge to Mail Client
    ... "Peter Jamieson" wrote: ... I then attempted to do the merge and got message that Outlook ... Outlook to be default mail client. ... security dialog boxes that appear when you use plain text fomat) ...
    (microsoft.public.word.mailmerge.fields)
  • Re: MAPIInitialize failed and get an error message
    ... typedef HRESULT (STDAPICALLTYPE *MSMAPIInitialize); ... MSMAPIInitialize fMAPIInitialize = NULL; ... OutlookSpy - Outlook, CDO ... -- Either there is no default mail client or the current mail client ...
    (microsoft.public.win32.programmer.messaging)
  • Re: MAPIInitialize failed and get an error message
    ... You won't be able to rely on mapi32.lib and the MAPI stub library. ... Make Microsoft Outlook your default mail client. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Outllok Express as the default mail program
    ... suitability of OE for use with Exchange. ... one (that is, go to Outlook, stay away from OE); the use of OE in an SBS ... workstation default mail client issue you are facing). ... I change it in group policies so that all the computers use ...
    (microsoft.public.windows.server.sbs)

Loading