好吧,我是個白癡,已經解決了我自己的問題。這不是最漂亮的代碼,但它的工作原理:
的關鍵是使用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