平时想用电脑打印两张照片最简单的方法就是把照片复制粘贴到word文档中,然后将文档用打印机打印出来。不过碰到一些尺寸不同的照片在word文档中调整大小就变得非常麻烦了。我们可以通过宏来自动调整照片大小,让这些照片可以放在一张A4纸下。
新建一个Word文档,切换选项卡到“布局”,点击图中标示荧光黄的位置打开页面设置。

在页面设置中,将设置页边距上下左右都设置为0.5厘米,纸张方向改为横向。

选择Word选项卡中的插入选项,选择要插入的照片文件,多选一次性插入。


这时,切换到选项卡到视图一项,点击右侧的“宏”。

在弹出界面中,随便输入一个宏名称,比如“打印”,然后点击创建。

将以下内容复制到弹出的Microsoft Visual Basic中,注意其中Height = 216 * 0.7、Width = 300 * 0.8中的数值。如果后续执行时不能缩进到同一页面下,可以调整这部分的数字。
Dim i As Integer
For i = 1 To Activedocument.InlineShapes.Count
With Activedocument.InlineShapes(i)
.Height = 238 * 0.7
.Width = 315 * 0.8
.Borders(wdBorderTop).LineStyle = wdLineStyleSingle
.Borders(wdBorderTop).LineWidth = wdLineWidth050pt
.Borders(wdBorderTop).Color = wdColorAutomatic
End With
Next i

编辑完成后关闭,回到Word界面,点击“宏”下拉菜单(倒三角),找到“查看宏”并单击运行,Word就会进行自动的缩放排序,多张图片很容易就缩进到一页内。如果不能,记得调整宏中Height、Width数值。


按下Ctrl+P调出打印页面,选择打印即可,一张A4规格的纸张就能缩进多张图片,是不是很方便?通过宏命令,可以将很多需要人手工一步一步调整的方法变成一步。以后打印照片就方便多啦。
