在WORD文档里每一页的相同位置插入同一图片的宏代码如下:
Sub InsPic()
Dim pag As Integer
For pag = 1 To Selection.Information(wdNumberOfPagesInDocument)
Selection.GoTo what:=wdGoToPage, Name:=pag
ActiveDocument.Shapes.AddPicture FileName:="d:\pic.wmf", Left:=330, Top:=-30, Anchor:=Selection.Range
Next
End Sub
但是如果是不同图片呢?比如:d:\pic1.wmf、pic2.wmf、pic3.wmf.。。。。。呢?
第一页对应pic1.wmf
第二页对应pic2.wmf
第三页对应pic3.wmf
。。。。。
“ActiveDocument.Shapes.AddPicture FileName:="d:\pic.wmf", ”
这句怎么修改?
Sub InsPic()
Dim pag As Integer
For pag = 1 To Selection.Information(wdNumberOfPagesInDocument)
Selection.GoTo what:=wdGoToPage, Name:=pag
ActiveDocument.Shapes.AddPicture FileName:="d:\pic.wmf", Left:=330, Top:=-30, Anchor:=Selection.Range
Next
End Sub
但是如果是不同图片呢?比如:d:\pic1.wmf、pic2.wmf、pic3.wmf.。。。。。呢?
第一页对应pic1.wmf
第二页对应pic2.wmf
第三页对应pic3.wmf
。。。。。
“ActiveDocument.Shapes.AddPicture FileName:="d:\pic.wmf", ”
这句怎么修改?