Saqib has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Transfering data excel locked sheets (e.g. Table as Picture) fro
Transfering data excel locked sheets (e.g. Table as Picture) from Excel & Gant Charts as Pictures from Adobe Acrobat to Word at particular locations
RE: Transfering data excel locked sheets (e.g. Table as Picture)
Hi Saqib, thanks for your query. The following subroutine copies the chart from the Area Report sheet of our Excel spreadsheet to the Word document c:\mydocument.doc which has a bookmark "MyBookmark" somewhere within it. If you have problems identifying the chart on your workbook just record a macro selecting your chart and copying it and amend the lines below. Note, programmatically very difficult to do this from Adobe PDFs. Best to cut and paste those.
Here's the code:
***********************
Sub PositionSpecific()
Dim appWord As Word.Application
Set appWord = New Word.Application
Sheets("Area Report").ChartObjects("Chart 3").Activate
Sheets("Area Report").ChartObjects("Chart 3").Copy
appWord.Documents.Open Filename:="c:\mydocument.doc"
appWord.Selection.GoTo What:=wdGoToBookmark, Name:="MyBookmark"
appWord.Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile
appWord.Visible = True
End Sub
***********************
Hope this helps,
Anthony