图片写入word中如何追加?
Function EditWord(filepath, filepic)Set oWordApp = CreateObject("Word.application")
oWordApp.visible = True
Set oWordDoc = oWordApp.Documents.Open(filepath)
oWordDoc.Range.Select
Set oWordSet = oWordApp.Selection
With oWordSet
Set oImg = .InlineShapes.AddPicture(filepic, False, True)
oImg.Width = oImg.Width*1.0
oImg.Height = oImg.Height*1.0
'中间对齐
oImg.Range.ParagraphFormat.Alignment = 1
.TypeParagraph
.TypeText "------------这是分割线----------------"
oWordDoc.Content =title
.TypeParagraph
End with
oWordDoc.Save
oWordApp.Quit
end function
图片已经可以写入了,但追加不了。每次都是打开。把上次的覆盖了。
插入前加个回车
插入后加个回车
试试看
页:
[1]