반응형
How To Automate Word to Perform Mail Merge from Delphi
Article ID | : | 229310 |
Last Review | : | January 24, 2007 |
Revision | : | 3.3 |
This article was previously published under Q229310
SUMMARY
This article demonstrates how to create and manipulate a Word document using Automation from Delphi.
MORE INFORMATION
This article parallels two articles that describe the same process using Visual C++ and Visual Basic. For more information, please see the following articles in the Microsoft Knowledge Base:
NOTE: Delphi is manufactured by Borland (Inprise Corporation), a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance of reliability. Contact Inprise for any developer support regarding the Delphi language.
220607 (http://support.microsoft.com/kb/220607/EN-US/) How To Automate Word to Perform Mail Merge From Visual Basic
220911 (http://support.microsoft.com/kb/220911/EN-US/) How To Automate Word to Perform a Mail Merge from Visual C++ and MFC
220911 (http://support.microsoft.com/kb/220911/EN-US/) How To Automate Word to Perform a Mail Merge from Visual C++ and MFC
Building the Automation Sample
1. | Start Delphi. A new project should be created by default. |
2. | Add a button to Form1. |
3. | Replace the contents of the code window for Unit1 with the following:
|
4. | Press the F9 key to run the project. Click the button and Microsoft Word should start and display a sample letter. |
REFERENCES
For more information on Office Automation, please visit the Microsoft Office Development support site at:
http://support.microsoft.com/ofd (http://support.microsoft.com/ofd)
반응형