Ask Experts Questions for FREE Help !
Ask
    hock8889's Avatar
    hock8889 Posts: 1, Reputation: 1
    New Member
     
    #1

    Oct 17, 2011, 12:03 PM
    Pasting Excel Table in Word at Bookmark
    The code below keeps pasting the range cells on the next page, after the bookmark called input.


    Xlobj.Sheets("Input").Select
    Range("A11:B30").Select
    Selection.Copy
    wdObj.ActiveDocument.Bookmarks("inputs").Range.go to.Select
    wdObj.Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, _
    Placement:=wdInLine, DisplayAsIcon:=False
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    Oct 17, 2011, 01:26 PM
    Like so:

    Code:
    Option Explicit
    
    Sub test()
    ' Set a reference to Microsoft Word ?? Object Library
    Dim WDApp As Word.Application
    Dim WDDoc As Word.Document
    
    Set WDApp = GetObject(, "Word.Application")
    Set WDDoc = WDApp.ActiveDocument
    
        Sheets("Inputs").Range("A11:B30").Copy
        WDDoc.Bookmarks.Item("Inputs").Range.Paste
    
    Set WDApp = Nothing
    Set WDDoc = Nothing
    End Sub

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

How to link to Excel table in Sharepoint [ 2 Answers ]

I have an Excel Workbook that's located on our Sharepoint site. I'd like to create a linked table to that file but I can't seem to get it to work correctly. I was able to link to the Sharepoint List where the file is located but I don't know how to manipulate the worksheet: really what I want...

Copying and Pasting Mandarin (Chinese) from PDF into Word [ 2 Answers ]

Does anyone know how to copy and paste Chinese (Mandarin) characters into Word? I am using a Macintosh and also need to find a way to copy & paste Pinyin (Romanization of Chinese sounds into English). Thank you. :) Jim

Export access table to Excel format [ 1 Answers ]

Hi, I am trying following code its working fine. Private Sub Command3_Click() 'Export function 'EXPORTS TABLE IN ACCESS DATABASE TO EXCEL 'REFERENCE TO DAO IS REQUIRED Dim strExcelFile As String Dim strWorksheet As String

Using one Excel list table in multiple worksheets [ 2 Answers ]

I have a workbook containing 13 worksheets. Sheet 13 contains two list tables. I need to link sheets 1 through 12 to the list tables in sheet 13 so that only one set of lists has to be updated when changes occur. Please help me...

Copying and pasting Microsoft Word [ 10 Answers ]

I have been applying for jobs online. I have my resume in Microsoft Word and have been unable to copy and paste like some applications call for. My product key has expired but all I have to do is click on cancel and the documents in my computer show on screen. I have used Microsoft Word help and...


View more questions Search