The information in this article applies to:
SUMMARY
In Microsoft Excel, you can use the SendMail method in a Visual Basic macro
for electronic mail (E-mail) functionality. However, for more complete
control of mail, including message content, subject, return receipt, and
recipients, you must use the VBAMAPI.DLL file, which currently ships with
Microsoft Project version 4.0 for Windows (this file is located on Setup
Disk 2).
Vbamapi.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. Note that if you use VBAMAPI.DLL with Microsoft Excel, use the built-in MailLogon and MailLogoff methods. Once you've downloaded the file, copy it to your Windows SYSTEM directory. The information in the "More Information" section of this article contains the Declare functions and data type definitions necessary to use VBAMAPI.DLL with Microsoft Excel. For more information about using MAPI with Microsoft Excel for Windows, please see the following articles: Q125854 Sending Mail from MS Excel Using VBAMAPI.DLL (Part 1) MORE INFORMATION
Microsoft provides examples of Visual Basic for Applications procedures 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. The Visual Basic procedures in this article are
provided 'as is' and Microsoft does not guarantee that they can be used in
all situations. While Microsoft support professionals can help explain the
functionality of a particular macro, they will not modify these examples to
provide added functionality, nor will they help you construct macros to
meet your specific needs. If you have limited programming experience, you
may want to consult one of the Microsoft Solution Providers. Solution
Providers offer a wide range of fee-based services, including creating
custom macros. For more information about Microsoft Solution Providers,
call Microsoft Customer Information Service at (800) 426-9400.
Checking for an Existing Mail SessionThe following function checks if there is a current mail session running. If there is no current session of mail, the function starts a new mail session and returns the current session number.
Prompting the User for an E-mail Name, Verifying the Name, and Displaying a Mail MessageThe following code prompts the user for an E-mail name, checks for or starts an instance of mail, verifies the E-mail, and brings up a mail message with the To, Subject, and Body text fields filled in and ready to send.
Additional query words: 5.00a 5.00c mail mapi vbamapi
Keywords : kbinterop kbprg |
Last Reviewed: December 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |