WD: Macros to Send a Word Document as Text or an AttachmentLast reviewed: July 30, 1997Article ID: Q96982 |
The information in this article applies to:
SUMMARYThe WordBasic FileSendMail statement opens a message window for sending the active document through a Microsoft Messaging Application Programming Interface (MAPI) - compliant mail system, such as Microsoft Mail or Microsoft Exchange. The current document is either inserted as text or inserted as an embedded attachment to the mail message.
MORE INFORMATIONTo change this setting programmatically, use the example appropriate for your version of Word. WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Word for Windows 6.x, 7.xYou can use the ToolsOptionsGeneral statement with the .SendMailAttach parameter to control whether the document is sent as text in the message window or as an attachment. The following sample macro sends the current document as an attachment to a mail message:
Sub MAIN ToolsOptionsGeneral .SendMailAttach = 1 FileSendMail End SubThe following sample macro inserts the current document text into a mail message:
Sub MAIN ToolsOptionsGeneral .SendMailAttach = 0 FileSendMail End Sub Word for Windows 2.xThe WordBasic FileSend statement is available in Word for Windows versions 2.0b and 2.0c. The .SendMailAttach argument was added to the ToolsOptionsGeneral command in Microsoft Word version 2.0c for Windows. To obtain pre-sales information about new or updated Microsoft products, call the Microsoft Sales Information Center at (800) 426-9400. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, see the Microsoft World Wide Offices Web site at:
http://www.microsoft.com/worldwide/default.htm REFERENCES"Using WordBasic" by WexTech Systems and Microsoft Kbcategory: kbusage kbmacro KBSubcategory: |
Additional query words: winword2 2.0b 2.0c attachment winword
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |