Link to home
Start Free TrialLog in
Avatar of CRISIL
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

Avatar of Sajithcgs
Sajithcgs

you had posted in wrong place well
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
Avatar of theGhost_k8
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.Application")
    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.Select
    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
Avatar of theGhost_k8
theGhost_k8
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial