+ Reply to Thread
Results 1 to 3 of 3

Macro to copy table to word as an image (problem)

  1. #1
    Registered User
    Join Date
    05-07-2014
    Location
    BH, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to copy table to word as an image (problem)

    Hello guys!

    It's the first time I'm posting here, I hope I´m doing it correctly.


    I'm trying to make a macro to copy an table in excel and export it as an image to an Existing word document.

    But everytime i'm doing this, the image is not in a good quality. If i do it manually the quality is better. Is there any way to perform this macro to export this table as an image with a better quality?

    I've tried in two ways, and both are not good.

    Can anyone help me?


    Here is the code:


    Code 1:

    Sub CopyDatatoWord()

    Dim DocWD As Word.Document
    Dim Sheet3 As Object
    Dim wdFind As Object
    Path = ThisWorkbook.Path
    name1 = "test.docx"
    Set AppWD = CreateObject("Word.Application")
    AppWD.Visible = True
    Set DocWD = AppWD.Documents.Open(Path + "\" + name1)


    Set Sheet3 = Sheets("test")


    Set wdFind = AppWD.Selection.Find

    Sheet3.Range("B2:L39").Copy
    wdFind.Text = "picture1"
    wdFind.Replacement.Text = ""
    wdFind.Forward = True
    wdFind.Wrap = wdFindContinue
    wdFind.Execute
    AppWD.Selection.PasteSpecial DataType:=3, Placement:=1

    Set AppWD = Nothing
    Set DocWD = Nothing
    Set appXL = Nothing
    Set wbXL = Nothing

    MsgBox "Done!"
    End Sub



    Thanks in advance!

  2. #2
    Registered User
    Join Date
    05-07-2014
    Location
    BH, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to copy table to word as an image (problem)

    Anyone?????

  3. #3
    Registered User
    Join Date
    05-07-2014
    Location
    BH, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to copy table to word as an image (problem)

    anyone?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Word macro to copy table from excel
    By nishant_88 in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2013, 05:04 AM
  2. macro to copy excel data into word table
    By steve61 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-08-2013, 08:02 AM
  3. Replies: 0
    Last Post: 08-10-2012, 03:09 AM
  4. Copy as image to Word
    By ChrisNor in forum Excel General
    Replies: 3
    Last Post: 03-20-2009, 08:24 AM
  5. Macro excel to copy and paste table from Word
    By Shunlee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2008, 06:52 AM

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