CRISIL
asked on
How to insert selected excel data along with chart into word document
How to insert selected excel data along with chart into word document
i don't think its in wrong place, sajithcgs....
it is possible .... this shows how to manually select and copy paste.
you have to add word and excel dlls that u must be knowing....
1. Create a Word Document:
Dim oApp As Word.Application
Dim oDoc As Word.Document
'Start a new document in Word
Set oApp = CreateObject("Word.Applica tion")
Set oDoc = oApp.Documents.Add
2. a. Copy Excel selection:
Range("A26").Select
Selection.Copy
b. Copy Excel chart:
ActiveSheet.ChartObjects(" Chart 1").Activate
ActiveChart.ChartArea.Sele ct
ActiveChart.ChartArea.Copy
c. Paste Excel selection into Word:
Selection.PasteExcelTable False, False, False
d. Paste Excel chart into Word:
Selection.PasteAndFormat (wdChartPicture)
let me know ...
it is possible .... this shows how to manually select and copy paste.
you have to add word and excel dlls that u must be knowing....
1. Create a Word Document:
Dim oApp As Word.Application
Dim oDoc As Word.Document
'Start a new document in Word
Set oApp = CreateObject("Word.Applica
Set oDoc = oApp.Documents.Add
2. a. Copy Excel selection:
Range("A26").Select
Selection.Copy
b. Copy Excel chart:
ActiveSheet.ChartObjects("
ActiveChart.ChartArea.Sele
ActiveChart.ChartArea.Copy
c. Paste Excel selection into Word:
Selection.PasteExcelTable False, False, False
d. Paste Excel chart into Word:
Selection.PasteAndFormat (wdChartPicture)
let me know ...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can do the following for exporting
Open the worksheet in Excel
Select the cells to be embedded
Click the Copy toolbar button
Switch to the Word document
Click the insertion point where you want the worksheet to be
Click Edit, Paste Special, and select Microsoft Excel Worksheet Object