+ Reply to Thread
Results 1 to 2 of 2

Copy data range from excel to word as an image (i.e. paste special)

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    Bridgwater
    MS-Off Ver
    Excel 2010
    Posts
    16

    Question Copy data range from excel to word as an image (i.e. paste special)

    Hi all,

    Could someone please provide me with an example of how to copy a data range and paste it in a word file as an image by paste special in VBA code. I am new to excel programming and i am unsure how to start the code. Any help will be much appreciated, Many thanks in advance.

  2. #2
    Registered User
    Join Date
    04-24-2012
    Location
    Bridgwater
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Copy data range from excel to word as an image (i.e. paste special)

    Hi All, I have managed to scrap something together that does the job, Please see below code:

    Private Sub CommandButton1_Click()
    Dim WordApp As Word.Application
    Dim WordDoc As Word.Document

    Set WordApp = CreateObject("Word.Application")
    WordApp.Visible = True

    Set WordDoc = WordApp.Documents.Add

    Range("a1:q23").Copy

    WordApp.Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafil, _
    Placement:=wdInLine, DisplayAsIcon:=False

    Set WordDoc = Nothing
    Set WordApp = Nothing

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1