从Word中的字段自动填充Word中的字母模板 [英] Auto-filling a letter template in Word from fields in a database

查看:125
本文介绍了从Word中的字段自动填充Word中的字母模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


我在Word中有一个字母模板有一些空白。我想用数据库中的字段填充这些空格。这些空白是:


客户名称

客户地址

预约日期

从业者(发件人)这封信)


理想情况下,我想在表单上添加一个按钮,当用户点击它时,它会从该特定记录中的字段中获取信息并填写在信函模板的空白处。


这可能吗?我一直在阅读关于邮件合并但我不确定它会做我需要的东西 - 它似乎是为了更多的批量邮件。此外,我一直在看Word表单字段,这似乎是我需要的但我不知道我的Office版本是否能正常使用(嗯,我试过的代码不是似乎认出''字。'')。我正在使用2000.


任何帮助/见解赞赏!

Hello

I have a letter template in Word that has some blanks. I want to populate these blank spaces with fields from the database. These blanks are:

client name
client address
appointment date
practitioner (sender of the letter)

Ideally, I''d like to add a button to a form and when a user clicks it, it will take the information from the fields in that specific record and fill in the blanks of the letter template.

Is this at all possible? I''ve been reading about Mail Merge but I''m not sure it will do what I need - it seems to be for more bulk mailing. Also, I''ve been looking at Word form fields which seems to be what I need but I don''t know if my version of Office will work with it properly (well, the code I''ve tried doesn''t seem to recognise ''Word.''). I''m using 2000.

Any help/insight appreciated!

推荐答案

我不知道多少你付出的努力。如果您对使用Access中的Word进行编程感兴趣,如果在Access Word to Microsoft Word Objects中有参考集,则会更容易。然后查看 Microsoft Word 2000参考 Microsoft Word Objects
I can''t tell how much effort you''ve put into this. If you are interested in programming with Word from Access, it will be easier if you have a reference set in Access to Microsoft Word Objects. Then check out Microsoft Word 2000 Reference and Microsoft Word Objects


好吧,完全不知道从哪里开始我只是在Google上搜索帮助和阅读内容。我想,我理解它的基础知识。我已经设置了对象的参考(干杯,谷歌!)


我一直在使用Word Forms并尝试通过Access来更新它们但我发现的代码(并根据我的数据库量身定制)似乎什么也没做。我今天下午正在玩弄它,但可能会再次陷入困境。


为这些链接干杯,ChipR,我会给他们看看。
Well, being completely clueless on where to begin I''ve just been googling for help and reading stuff. I understand the basics of it, I think. I have set the reference to Word Objects (cheers, google!)

I have been playing around with using Word Forms and trying to get them to update via Access but the code I found (and tailored to my database) doesn''t seem to do anything. I''m toying around with it this afternoon but will probably get stuck again.

Cheers for those links though, ChipR, I''ll give them a look.


您还可以查看我们在Insights中的文章有关应用程序自动化的部分。虽然使用的例子是Excel和Outlook的基本原则。


Mary
You can also check out our article in the Insights section on Application Automation. Although the examples used are for Excel and Outlook the basic principles stand.

Mary


这篇关于从Word中的字段自动填充Word中的字母模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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