Word Mailmerge [英] Word Mailmerge

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

问题描述




我想在我的vb.net应用程序中做一个单词mailmerge表单。我的问题是

如何对我的一个表进行查询并将结果用作邮件合并

数据源。任何帮助将不胜感激。


谢谢


问候

Hi

I am trying to do a word mailmerge form within my vb.net app. My problem is
how to do a query on one of my tables and use the result as the mail merge
datasource. Any help would be appreciated.

Thanks

Regards

推荐答案

可以使用XML文件,如果是这样,你可以输出它。没有那个

输入Acess或Excel speadsheet。


OHM


John写道:
Can word make use of an XML file, if so you could output that. Failing that
ourput to an Acess or Excel speadsheet.

OHM

John wrote:


我想在我的vb.net应用程序中做一个单词mailmerge表单。我的问题是如何在我的一个表上进行查询并使用结果
作为邮件合并数据源。任何帮助将不胜感激。

谢谢

问候
Hi

I am trying to do a word mailmerge form within my vb.net app. My
problem is how to do a query on one of my tables and use the result
as the mail merge datasource. Any help would be appreciated.

Thanks

Regards



嗨约翰,
Hi John,
我正在尝试在我的vb.net应用程序中执行单词mailmerge表单。我的问题是如何对我的一个表进行查询并将结果用作邮件合并数据源。任何帮助将不胜感激。
I am trying to do a word mailmerge form within my vb.net app. My problem is
how to do a query on one of my tables and use the result as the mail merge
datasource. Any help would be appreciated.



什么是数据源?它是否支持将查询保存为查询/视图?


如果没有,它是否有ODBC接口(驱动程序)?


你估计查询可以包含多少个字符,max?


最后,你要处理哪个版本的单词?


Cindy Meister

INTER-Solutions,瑞士
http://homepage.swissonline.ch/cindymeister
http:/ /www.mvps.org/word
http:// go。 compuserve.com/MSOfficeForum


此回复发布在新闻组中;请在新闻组中发布任何跟随问题或

回复,而不是通过电子邮件:-)


What''s the data source? And does it support saving the query as a query/view?

If not, does it have an ODBC interface (driver)?

And how many characters would you estimate the query could contain, max?

Finally, which version(s) of word would you be dealing with?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)


这里有一个示例我为一位需要同样事情的朋友写过。

注意DSN的必要性。这是使用odbc。我找不到任何其他的

方式。

也注意到模板文件的硬编码路径。你将需要为你调整


我的模板文件只有一个名为''au_fname''的邮件合并字段。


Private Sub DoMailMerge()

Dim w As New Word.Application

Dim d As Word.Document

d = w.Documents。打开(&c; \ some.dot")

Dim strConnection As String


strConnection =" DSN = bob; uid = sa; pwd =;"

d.MailMerge.OpenDataSource(" c:\t.txt",,,,,,,,,,,,

strConnection,SELECT * FROM authors)


d.MailMerge.Execute()

d.Close(False)

w.Visible = True

End Sub


Kirk Graves


" John" <乔** @ nospam.infovis.co.uk>在消息中写道

新闻:Oc ************** @ tk2msftngp13.phx.gbl ...
here is a sample I wrote for a friend that needed the same thing.
Notice the need of a DSN. This is using odbc. I couldn''t find any other
way.
also, notice the hardcoded path to the template file. You will need to
adjust for yours instead.
My template file had just 1 mail merge field named ''au_fname''.

Private Sub DoMailMerge()
Dim w As New Word.Application
Dim d As Word.Document
d = w.Documents.Open("c:\some.dot")

Dim strConnection As String

strConnection = "DSN=bob;uid=sa;pwd=;"
d.MailMerge.OpenDataSource("c:\t.txt", , , , , , , , , , ,
strConnection, "SELECT * FROM authors")

d.MailMerge.Execute()
d.Close(False)
w.Visible = True
End Sub

Kirk Graves

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:Oc**************@tk2msftngp13.phx.gbl...


我想在我的vb.net应用程序中做一个单词mailmerge表单。我的问题
是如何在我的一个表上进行查询并将结果用作邮件合并数据源。任何帮助将不胜感激。

感谢

问候
Hi

I am trying to do a word mailmerge form within my vb.net app. My problem is how to do a query on one of my tables and use the result as the mail merge
datasource. Any help would be appreciated.

Thanks

Regards



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

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