如何删除空值邮件合并字段? [英] How to remove empty value mail merge fields?

查看:449
本文介绍了如何删除空值邮件合并字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试使用open xml生成邮件合并文档。我可以生成文档但是如果找不到合并字段的值,则会留下空白空间。如果找不到邮件合并字段的值,我想删除/删除它,以便
最终生成的文档没有任何空格。



问候

解决方案


>> I可以生成文档,但如果找不到合并字段的值,则会留下空白区域。如果找不到邮件合并字段的值,我想删除/删除它,以便最终生成的文档没有任何空白的
空格。<<


根据描述,您希望在使用Open XML进行邮件合并时删除空格。为了实现这一目标,我们可以删除maile merge字段,如果数据为null或为空,而不是将其值设置为空。


Woule you mind nbsp;分享您正在使用的代码邮件合并?这里有关于邮件合并的博客:

使用Open XML SDK 2.0与自定义客户端合并邮件


最好的问候


Fei


Hi,

I am trying to generate mail merge document using open xml. I can generate the document but if there was no value found for a merge field, it leaves an empty space. If there is no value found for a mail merge field I would like to remove/delete it so the finally generated document does not have any blank spaces.

Regards

解决方案

Hi,

>>I can generate the document but if there was no value found for a merge field, it leaves an empty space. If there is no value found for a mail merge field I would like to remove/delete it so the finally generated document does not have any blank spaces.<<

Based on the description, you want to remove the blank spaces when you using Open XML to mail merge. To achieve the goal, we can remove the maile merge filed if the data is null or empty rather than set its value to empty.

Woule you mind sharing the code you are using to mail merge? And here is blog about Mail Merging:
Mail Merging with a Custom Client Using the Open XML SDK 2.0

Best regards

Fei


这篇关于如何删除空值邮件合并字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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