摘要
简单文本格式无法生成复杂的表格和图形,因而采用WORD(或EXCEL)作为专用软件的数据报表文件是很有意义的,它可以按照用户要求将数据以图表的形式形象地表示出来。为了在VC++环境中创建和生成WORD文档,必须利用COM技术,把WORD程序看做COM服务器,把用户程序看做客户端,利用COM技术创建WORD对象,利用WORD对象调用VBScript函数(宏函数)来控制WORD文档的生成。通过研究证实该技术是可行的,并且对OFFICE软件都适用。
Simple text file can't display data in table or chart format, so using word (or excle) document as program's report file is very useful, it can use table and chart to display data in a direct and clear way, a ccoring to the users' reqirement. In order to create a word document in VC++ environment, COM technology must be used. The word program worked as server and user's program worked as client. A word object was created by COM technology, and then the word object was used to call VBScript function for manipultating the generation of word document. This technology is useful to all office programs.
出处
《计算机工程与设计》
CSCD
2004年第6期961-962,967,共3页
Computer Engineering and Design