SYMPTOMSWhen you run a macro that uses the SendMail method, you may receive the following error message:
CAUSEThe SendMail method only works with MAPI mail clients, such as Starnine Mail. In these clients, the MailSystem property returns a value of 1. RESOLUTIONMicrosoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools used to
create and debug procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspThe following sample macro verifies if the mail client that you are using is a MAPI client. Then, based on the result, the macro either uses the SendMail method or an alternative method using the Mail Recipient CommandBar control. NOTE: In the above code, replace <valid e-mail address> with the e-mail address of a person to whom you can usually send an e-mail message via your e-mail client.When you run the Check_Mail macro, it sends your workbook to the specified person if you are using a MAPI e-mail client. If you are not using a MAPI e-mail client, your e-mail client is started, but you have to type the person's e-mail address in the new message that is created. MORE INFORMATIONDepending on your e-mail client, the MailSystem property returns one of the following constants:
REFERENCESFor additional information about how to run sample code, click the article number below to view the article in the Microsoft Knowledge Base: Q181058 OFF98: How to Run Sample Code from Knowledge Base Articles Additional query words: vba xl98 email e-mail
Keywords : kbdta OffVBA |
Last Reviewed: November 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |