创建,打开和打印从C word文件++ [英] Creating, opening and printing a word file from C++

查看:198
本文介绍了创建,打开和打印从C word文件++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个相关的问题。

I have three related questions.

我想创建一个与C ++名字的word文件。我希望能够发送印刷命令文件的,所以正在打印的文件,而无需打开文档的用户和做手工,我希望能够打开文档。打开文档应该只是打开Word,然后打开该文件。

I want to create a word file with a name from C++. I want to be able to sent the printing command to this file, so that the file is being printed without the user having to open the document and do it manually and I want to be able to open the document. Opening the document should just open word which then opens the file.

推荐答案

您可以使用办公自动化完成这个任务。你可以找到经常问到的关于办公自动化与C ++的问题在 http://support.microsoft.com/kb/196776 http://support.microsoft.com/kb/238972

You can use Office Automation for this task. You can find answers to frequently asked questions about Office Automation with C++ at http://support.microsoft.com/kb/196776 and http://support.microsoft.com/kb/238972 .

请记住,做办公自动化与C ++,你需要了解如何使用COM。

Keep in mind that to do Office Automation with C++, you need to understand how to use COM.

下面是如何执行字usign C ++各种任务的一些例子:

Here are some examples of how to perform various tasks in word usign C++:

大多数这些样品的展示了如何使用MFC做到这一点,但使用COM来操纵Word中的概念是相同的,即使您使用ATL或COM直接。

Most of these samples show how to do it using MFC, but the concepts of using COM to manipulate Word are the same, even if you use ATL or COM directly.

这篇关于创建,打开和打印从C word文件++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆