摘要
介绍了利用automation技术基于MFC库开发C++自动化客户程序;指明了自动化客户端和组件端的IDispatch接口通讯的实现;阐述了利用Microsoftword录制宏以得到VBA代码,并完成VBA到C++的转化。应用结果表明,利用该方法只需编写少量代码,便可在自主开发的应用程序中融入Microsoftoffice的强大功能,从而实现应用程序复杂的自动化文本、数据处理功能。
This paper introduced how to realize C++ automation client application based on MFC, pointed out how to communicate between the automation client and the server through the IDispatch interface, and it explained how to record the macro to get the VBA code by using Microsoft word application and finish the translation from VBA to C++. The application result shows that with this method, the powerful function of Microsoft office can be embedded into the application developed by ourselves by a few codes. So the complex function of automatic text and data processing can be realized.
出处
《解放军理工大学学报(自然科学版)》
EI
2005年第4期334-336,共3页
Journal of PLA University of Science and Technology(Natural Science Edition)