好吧,我是个白痴,已经解决了我自己的问题。这不是最漂亮的代码,但它的工作原理:
的关键是使用document.InlineShapes.Select:
Public Sub Chart2Word(chto As Chart, doc1 As Word.Document, docapp As Word.Application, _
Optional Title As Variant)
Dim objpic As Word.InlineShape
docapp.Activate
chto.CopyPicture
docapp.Selection.MoveEnd wdStory
docapp.Selection.Move
docapp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
docapp.Selection.Range.PasteSpecial DataType:=wdPasteEnhancedMetafile, Placement:=wdInLine
doc1.InlineShapes(doc1.InlineShapes.Count).Select
Label = Me.Range("LabelName").value
If Not IsMissing(Title) Then
docapp.Selection.InsertCaption Label:=Label, Title:=": " + Title
End If
+2的尝试,-1太早到达求救= d – Alex 2014-11-05 17:26:32