跳至主要内容

如何在Word邮件合并中使用Excel数据和图片

Author: Xiaoyang Last Modified: 2025-05-07

如果你有一个包含学生姓名、年龄、课程、学院和照片路径的Excel工作表信息列表,现在你想根据以下截图所示,在Word中为每个学生制作一张考试准考证。为了快速简便地制作这种卡片,Word中的邮件合并功能可以帮助你完成。

A screenshot of a sample exam admission card created using mail merge in Word

在Word邮件合并中使用Excel数据和图片


在Word邮件合并中使用Excel数据和图片

应用邮件合并功能创建带有图片的卡片,请按照以下步骤逐一操作:

步骤1:在Excel中准备数据列表

1. 在工作表中输入你需要的信息,并按以下截图所示输入图片文件路径:

A screenshot of an Excel sheet with student information, including paths to their photos

2. 然后,你需要通过在地址中的每个斜杠后添加另一个斜杠来修改图片地址,见截图:

A screenshot showing how to adjust file paths by adding double slashes in Excel
提示:如果有多个单斜杠需要转换为双斜杠,你可以使用Excel中的“查找和替换”功能一次性查找并替换它们。

3. 输入数据后,保存并关闭Excel文件。

步骤2:准备Word文档

4. 你可以根据自己的需求在Word文档中准备和设计卡片格式,如下截图所示:

A screenshot of a Word document with a formatted template for student cards

步骤3:建立Excel文件与Word文档之间的关联

5. 完成Word文件中的信息格式后,请点击“邮件”>“选择收件人”>“使用现有列表”,见截图:

A screenshot showing the Mailings tab with the Select Recipients option in Word

6. 然后,在弹出的“选择数据源”窗口中,选择你创建的Excel文件,然后点击“打开”按钮,见截图:

A screenshot of the Select Data Source dialog box in Word to choose the Excel file

7. 在接下来的“选择表格”对话框中,选择包含你想使用的学生成绩的工作表,然后点击“确定”,见截图:

A screenshot of the Select Table dialog box in Word to choose the worksheet for the mail merge

8. 接下来,将光标放在“姓名”旁边,点击“邮件”>“插入合并域”>“姓名”,“姓名”字段将被插入到Word文档中,如下截图所示:

A screenshot showing the insertion of the Name merge field in the Word document

9. 然后,你应该重复上述步骤,为年龄、课程和学院插入其他相应的字段以获得以下结果:

A screenshot of a Word document with fields for Name, Age, Course, and College added for mail merge

10. 插入数据字段后,接下来,你应该插入图片字段。现在,请将光标放在你想显示图片的位置,然后点击“插入”>“快速部件”>“域”,见截图:

A screenshot of the Insert Quick Parts Field option for adding images in Word

11. 在弹出的“域”对话框中,从左侧的“域”名称窗格中选择“IncludePicture”,然后,在“域”属性文本框中输入任何内容,例如Image,然后点击“确定”按钮保存设置。见截图:

A screenshot showing the Field dialog box with IncludePicture selected in Word

12. 现在,图片已插入到文档中,但你看不到它。

A screenshot showing an empty placeholder for an image after using IncludePicture in Word

13. 然后,点击图片并按下“Alt”+“F9”切换到域代码,如下截图所示:

A screenshot of the image field code after toggling field codes in Word
a screenshot of kutools for excel ai

使用 Kutools AI 解锁 Excel 魔法

  • 智能执行:执行单元格操作、分析数据和创建图表——所有这些都由简单命令驱动。
  • 自定义公式:生成量身定制的公式,优化您的工作流程。
  • VBA 编码:轻松编写和实现 VBA 代码。
  • 公式解释:轻松理解复杂公式。
  • 文本翻译:打破电子表格中的语言障碍。
通过人工智能驱动的工具增强您的 Excel 能力。立即下载,体验前所未有的高效!

14. 选择高亮显示的图片代码中的单词Image,然后点击“邮件”>“插入合并域”>“照片”,见截图:

A screenshot showing the Photo field added in Word for the mail merge

15. 单击“照片”字段后,代码将转换为如下截图所示:

A screenshot of the updated field code after adding the Photo field in Word

16. 现在,再次按下“Alt”+“F9”,但图片仍然不可见。

A screenshot showing the placeholder for the photo before finalizing the mail merge in Word

17. 继续点击“邮件”选项卡,然后点击“完成并合并”>“编辑单个文档”,见截图:

A screenshot showing the Finish & Merge option in the Mailings tab in Word

18. 在弹出的“合并到新文档”对话框中,从“合并记录”中选择“全部”,然后点击“确定”按钮。

A screenshot of the Merge to New Document dialog box in Word for completing the mail merge

19. 一个包含所有数据信息的新文档打开,但图片可能仍然不可见,见截图:

A screenshot of a new document after the mail merge but with images not yet visible

20. 要使图片可见,按下“Ctrl”+“A”选择Word文件中的所有内容,然后按下“F9”键,在弹出的“Microsoft Word安全通知”对话框中,点击“是”按钮,见截图:

A screenshot of the Microsoft Word Security Notice dialog box during mail merge

21. 单击“是”后,你可以看到Word文件中填充了从Excel工作表中合并的图片和数据信息,如下截图所示:

A screenshot of a Word document filled with data and pictures after completing the mail merge

然后,你可以根据需要打印并保存文件。


演示:从Excel到Word的邮件合并数据和图片

 

最佳办公效率工具

🤖 Kutools AI 助手:基于智能执行生成代码创建自定义公式分析数据并生成图表调用 Kutools 函数等功能,彻底改变数据分析方式…
热门功能查找、高亮或标记重复项 | 删除空行 | 合并不丢失数据的列或单元格 | 四舍五入 ...
高级 LOOKUP多条件 VLookup | 多值 VLookup | 多表查找 | 模糊查找 ....
高级下拉列表快速创建下拉列表 | 从属下拉列表 | 多选下拉列表 ....
列管理器添加指定数量的列 | 移动列 | 切换隐藏列的可见状态 | 比较区域和列 ...
精选功能网格聚焦 | 设计视图 | 增强编辑栏 | 工作簿与工作表管理器 | 资源库(自动文本) | 日期提取 | 合并数据 | 加密/解密单元格 | 按列表发送电子邮件 | 超级筛选 | 特殊筛选(筛选粗体/斜体/删除线...)...
排名前 15 的工具集12 种文本 工具添加文本删除特定字符等) | 50 多 种图表 类型甘特图等) | 40 多种实用 公式基于生日计算年龄等) | 19 种插入 工具插入二维码根据路径插入图片等) | 12 种转换 工具小写金额转大写汇率转换等) | 7 种合并与分割 工具高级合并行分割单元格等) | 还有更多...

使用 Kutools for Excel 提升您的 Excel 技能,体验前所未有的高效。 Kutools for Excel 提供超过 300 种高级功能来提高生产力并节省时间。 单击此处获取您最需要的功能...


Office Tab 将标签式界面引入 Office,让您的工作更加轻松

  • 在 Word、Excel、PowerPoint 中启用标签式编辑和阅读
  • 在同一窗口的新标签页中打开和创建多个文档,而不是在新窗口中进行操作。
  • 将您的生产力提升 50%,每天为您减少数百次鼠标点击!