使用 OpenOffice 进行邮件合并
我目前正在尝试使用 C# 和 OpenOffice 进行邮件合并。
我的数据库中有一个 destanatary 列表。 我希望这成为可能:
- 用户编辑 OO 文档,将 “名称”“地址”“城市”等字段 和一些标准文本(例如:“你好 姓名你好吗?”,
- 编辑样式等,
- 然后转到我的应用程序,点击 “发送给数据库中的所有用户”。
然后程序循环遍历所有用户,并为每个用户用 DB 数据替换 OO 文档中的邮件合并字段,通过邮件/打印/其他方式发送。
问题: 在 C# 中,我找不到任何方法用 DB 数据替换 OO 文档中的邮件合并字段,因为我找不到处理这些字段的属性/方法。
请大家帮帮我,年终奖就靠它了! (原文如此)
我发现的唯一提示是我似乎需要 UNO 库,但 C# 中似乎不存在它。
I'm currently trying to do a mailmerge, using C# and OpenOffice.
I have a list of destanatary in my DB. I would like this to be possible :
- the user edit an OO document, put
fields like "name" "adresse" "city"
and some standard text (e.g. : "Hello
Name how are you ?", - edit the style, etc etc,
- then go to my application, clic on
"Send to all user in DB".
Then the program loops through all user, and for each user replace the mailmerge fields in the OO document with DB data's, send it by mail/print/whatever.
Problem : I can't find any way, in C#, to replace the mailmerge fields in the OO document with DB data's, because i can't find what Property/Method handle these fields.
Please help me by annual bonus depends on it ! (sic)
Only pointer I found was that it seems I'll need the UNO Library, but it seems it doesn't exist in C#.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有关在 OpenOffice 中使用 C# 的一般帮助:
http://www.oooforum.org/论坛/viewtopic.phtml?p=151606
http://opendocument4all.com/content/view/68/47/
与OO 3.0 您需要引用 cli_*.dll 库,它们在安装 OO 时放入 GAC。
初始化 OO 连接的示例代码:
加载文档:
where
阅读有关我们可以做什么的更多信息 XTextDocument 此处。
另请参阅 OpenOffice.org 开发人员指南。
更新。
另一个有用的链接:
http://blog.nkadesign .com/2008/net-working-with-openoffice-3/
希望这有帮助
General help on using C# with OpenOffice:
http://www.oooforum.org/forum/viewtopic.phtml?p=151606
http://opendocument4all.com/content/view/68/47/
With OO 3.0 you'll need to reference cli_*.dll libraries, they are put to GAC when OO is installed.
A sample code to initialize OO connection:
Loading document:
where
Read more on what you can do we XTextDocument here.
See also OpenOffice.org Developer's guide.
UPDATE.
One more useful link:
http://blog.nkadesign.com/2008/net-working-with-openoffice-3/
Hope this helps