编辑Microsoft Word文档编程 [英] Editing Microsoft Word Documents Programmatically

查看:196
本文介绍了编辑Microsoft Word文档编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如果能够做到这一点。

I want to know if this could be done.

我建立一个数据字典为我们的软件系统(学校的项目),和我想的一个自动化的方式来做到这一点。基本上我不使用太多的Microsoft Word(2007年),我只用它在记录学校的东西,等我想知道,如果它可以创建/编程从模板编辑Word文档。

I am building a data dictionary for our software system (school project), and I'm thinking of an automated way to do this. Basically I don't use much of Microsoft Word (2007), I only use it in documenting schools stuff, etc. I want to know if its possible to create/edit a Word document programmatically from a template.

我们的想法是,我将创建在Word中的页面,其中包含将每个页面上重复一个空的形式。对于每一个,我将投入我的程序,它会更新相应字段的形式,并跳到下一个表单数据。

The idea is, I will create a page on Word that contains an empty form that will be repeated on every page. For every data that I will input to my program, it will update the corresponding field in the form and skips to the next form.

这样做的目的,是消除复制粘贴的方法(我的习惯),并在文档的时候加快速度。

The purpose of this, is to eliminate copy-paste methods (my habit) and to speed things up when doing the documentation.

推荐答案

字自动化,所建议的人,会导致你受伤的世界主要有两个原因:

Word automation, as suggested by others, will lead you to a world of hurt for two major reasons:

  1. 在办公室不打算无人值守运行,所以它可以弹出消息框在任何时间,和
  2. 这是(可能)不许可,以便为那些没有它的电脑办公功能。如果您使用的自动化生成一个网站一个Word文档,你必须确保这个功能不能被那些没有安装Office(除非他们改变了这个规则在过去几年中)电脑到达。

我已经使用 Aspose.Words ,它的成本一点点,但它运作良好,并适用于这一点。

I have used Aspose.Words, it costs a little, but it works well and is intended for this.

这篇关于编辑Microsoft Word文档编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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