+ Reply to Thread
Results 1 to 2 of 2

Locating table # in WORD document with Excel VBA

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Exceland
    MS-Off Ver
    Excel 2010
    Posts
    24

    Post Locating table # in WORD document with Excel VBA

    Hi all,

    I have some background with Excel VBA, but am new to applying VBA to Word, so am looking for help.

    My goal is to retrieve a particular table from a bunch of .docx documents and paste them into Excel. I have a working code for most of the process, and have been automating the script to retrieve the 7th table of each word file. However, I found out that the docs actually have different number of tables, and it's not always the 7th table that's the one I want. Fortunately, the table I want is always immediately preceded by the title "III. TableINeed". Does anyone know how I can locate which table number this is based on its title?

    To give you an idea of the code, here's a relevant portion:

    Please Login or Register  to view this content.
    As you can see I now hard code to table 7, but that needs to be dynamic based on the word file.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Locating table # in WORD document with Excel VBA

    attach a sample word docx and full code
    If solved remember to mark Thread as solved

+ 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