如何在 Word 中对 MERGEFIELD 进行子字符串化?

发布于 2024-07-10 12:28:54 字数 230 浏览 6 评论 0原文

这个让我很疑惑。 这似乎是一项简单的任务,但解决方案却让我困惑: - 如何在用于邮件合并的 Word 模板中对合并字段进行子串化?

例如,我有类似 {MERGEFIELD Barcodevalue} 的内容,我想提取前 6 个字符,因为它同时也是其他内容的标识符。

我可以找到有关如何删除数字字段 (\x) 中给定位置左侧但不右侧的字符的信息。

This one has me puzzled. It seemed like an easy task, but the solution eludes me:
- How do you substring a merge field in a Word template used for mail merging?

For example, I have something like {MERGEFIELD barcodevalue} and I want to extract the first 6 characters as it is at the same time an identifier for something else.

I can find information on how to remove chars to the left of a given position in a numerical field (\x) but not to the right.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听不够的曲调 2024-07-17 12:28:54

您的邮件合并数据的数据提供商是什么? 如果是 SQL 查询,您可以使用 SQL 的 substr/substring 函数。

无论如何,更改源数据/查询可能比调整邮件合并字段代码更容易,这似乎是有限的。

What is the data provider for your mail merge data? If it is an SQL query you could use the substr/substring function of SQL.

Anyway it might be easier to change your source data/query instead of tweaking mailmerge fieldcodes, which seems to be limited.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文