MS-Word2003で、画像をぺたぺた貼って、リサイズするVBA。といってもマクロを記録して少し加工しただけ。備忘録として
Dim jpg(8) jpg(0) = "1-1.JPG" jpg(1) = "1-2.JPG" jpg(2) = "1-3.JPG" jpg(3) = "2-1.JPG" jpg(4) = "2-2.JPG" jpg(5) = "3-1.JPG" jpg(6) = "3-2.JPG" jpg(7) = "3-3.JPG" For i = 0 To 8 Selection.InlineShapes.AddPicture FileName:= _ "C:\Documents and Settings\adm\My Documents\jpg\" & jpg(i) _ , LinkToFile:=False, SaveWithDocument:=True Next i Documents("C:\Documents and Settings\adm\My Documents\tmp\test1.doc").Activate Debug.Print ActiveDocument.InlineShapes.Count For i = 0 To ActiveDocument.InlineShapes.Count ActiveDocument.InlineShapes(i).Height = 344.95 ActiveDocument.InlineShapes(i).Width = 344.95 Next i
0 件のコメント:
コメントを投稿