+ Reply to Thread
Results 1 to 2 of 2

Copy data from word to excel - Word VBA

  1. #1
    Registered User
    Join Date
    04-27-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    3

    Copy data from word to excel - Word VBA

    I am trying to automate a word template to update an excel sheet. I managed to complete almost 90% of the automate.
    However, I am stuck up with a minor problem. The excel sheet is sort of a database which needs to be constantly updated. Hence, I need to identify the last row in the excel sheet.
    The code throws up an error "Runtime error 1004" when I run the code.

    I wanted to find the valve for y


    it will be great if any one can help me out on the bug


    Please Login or Register  to view this content.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Copy data from word to excel - Word VBA

    Since you're using late binding, you can't use Excel constants; you need to use their equivalent values, thus:
    Please Login or Register  to view this content.
    There is also no need to activate the worksheet.

    Your code has other fundamental problems, which I'm sure you'll now discover...
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

+ 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. Extract Word header table data to excel (closed word document)
    By Yakov on Excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-14-2017, 02:12 PM
  2. Excel VBA - Word to search for part of a word and replace full word
    By charlie543 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-24-2016, 02:56 AM
  3. VBA Transfer Data From Excel to Word and Keep Bookmarks in Word Documents
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2015, 05:37 AM
  4. Replies: 0
    Last Post: 08-19-2014, 05:13 AM
  5. Extracting data from excel to word. Different versions of MS Word giving issues.
    By aritradey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 09:46 AM
  6. Copy Many Word Docs to New Word Doc (Each Word Doc Should be on New Page)
    By realniceguy5000 in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2013, 03:28 AM
  7. [SOLVED] Print labels by using Excel data in a Word mail into word
    By Zoey in forum Excel General
    Replies: 1
    Last Post: 11-02-2005, 06:17 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