Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I am trying to copy a chart from excel into a word document, at a position specified by a bookmark. I also want the float over text to be deactivated. My rather poor attempt at that was: Sub FlushGraphs() Dim WordObj As Word.Application, WordDoc As Word.Template Set WordObj = CreateObject("Word.Application") Sourcedir = ThisWorkbook.Path FileName = Sourcedir & "\myworddocument.doc" WordObj.Documents.Open (FileName) WordObj.Visible = True With Excel.Application .ActiveSheet.ChartObjects("Chart 2").Activate .ActiveChart.ChartArea.Select .ActiveChart.ChartArea.Copy End With With WordObj rRange = .ActiveDocument.Bookmarks(1).Range rRange.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, _ Placement:=wdInLine, DisplayAsIcon:=False .ActiveDocument.Bookmarks(2).Range.Text = "HELLO" ' to satisfy myself the bookmarks work End With ' Set WordDoc = Nothing ' Set WordObj = Nothing ' WordObj.Documents.Save ' WordObj.Documents.Close ' WordObj.Quit End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to merge excel and word documents | Excel Discussion (Misc queries) | |||
alignment problems when copying excel graphs to word | Excel Discussion (Misc queries) | |||
Copying an Excel chart into a Word document | Excel Discussion (Misc queries) | |||
Excel startup switches | Excel Discussion (Misc queries) | |||
Text not copying as text from Word to Excel 2003 | Excel Discussion (Misc queries) |