+ Reply to Thread
Results 1 to 2 of 2

Extent range to copy data from Excel to Word

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-17-2011
    Location
    amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    189

    Extent range to copy data from Excel to Word

    Hi I need to export data from word to excel.
    I Already created macro but I need to extent it:
    -It now only takes data from range A1:A10, but it needs to copy all data that is availlable in column A
    -It needs to print the word doc.

    Much Appreciated and nice weekend!




    Sub PasteToWord()

    Dim wdApp As Object
    Dim wd As Object

    On Error Resume Next
    Set wdApp = GetObject(, "Word.Application")
    If Err.Number <> 0 Then
    Set wdApp = CreateObject("Word.Application")
    End If
    On Error GoTo 0

    Set wd = wdApp.Documents.Open("h:\test.docx")

    wdApp.Visible = True

    Range("A1:A10").CopyPicture xlScreen, xlPicture
    wd.Range.Paste


    End Sub
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,899

    Re: Extent range to copy data from Excel to Word

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Copy Excel Range to Word
    By deweywayne in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-25-2013, 02:09 AM
  2. Macro to copy and paste an excel range into a word doc and then print to PDF??
    By Weswold in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2012, 11:34 AM
  3. Copy Range from Excel and Paste it in MS Word and then save it in a specified path
    By prasadcherry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-10-2012, 02:29 PM
  4. Copy data range from excel to word as an image (i.e. paste special)
    By papasideris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2012, 09:54 AM
  5. Copy Excel Range into Word, without Normal.docm save prompt
    By Graham1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2011, 02:52 PM

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