XL7: How to Create a Form Letter with a Visual Basic MacroLast reviewed: September 2, 1997Article ID: Q138283 |
The information in this article applies to:
SUMMARY When you use OLE Automation to communicate from one program to another, you can complete many useful tasks without having to leave the client program. For example, perhaps you store data in Microsoft Excel, but you would like to create form letters in Microsoft Word using this data. The example provided in the "More Information" section of this article shows how you can perform this task programmatically. Note that you may experience problems running a macro in Microsoft Excel if you are using a Microsoft Excel data source to perform a mail merge in Microsoft Word. The resolution to this problem is to save the Microsoft Excel file as a Word document and to use the Word document as the source of the data. In the macro example provided below, the macro saves the Microsoft Excel data file to a Word document. For additional information about this problem, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q138289 TITLE : XL7: Error Using OLE Automation with Microsoft Word 7.0 MORE INFORMATIONMicrosoft 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 Product Support Services (PSS) Engineers 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. To use the following macro, you will need to set up the data source in Microsoft Excel. To do so, perform the following steps:
REFERENCESFor more information about OLE Automation, click the Index tab in Microsoft Excel Help, and type the following text:
OLE |
Additional query words: 7.00 mail merge
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |