+ Reply to Thread
Results 1 to 7 of 7

Grab Data From Word Header using Excel Macro

  1. #1
    Registered User
    Join Date
    09-28-2011
    Location
    Afghanistan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Grab Data From Word Header using Excel Macro

    I've been working for days on this code, to no avail...

    I have about 800 word files with headers that looks like so:
    Please Login or Register  to view this content.
    And I'm attempting to bring them into Excel into their own columns.

    So far I'm getting all sorts of errors doing this:
    Please Login or Register  to view this content.
    This most recent version was attempted by doing the macro in Word first, then bringing it over to Excel with the Word.Application (or Obj_Wapp) function.

    I'm sure there's an easier, and functional, way to do this..Any thoughts?
    Last edited by WvuSoldier; 09-29-2011 at 07:52 AM. Reason: Added Complete Code

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Grab Data From Word Header using Excel Macro

    Hello WvuSoldier,

    Welcome to the Forum!

    You should include a sample Word file.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    09-28-2011
    Location
    Afghanistan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Grab Data From Word Header using Excel Macro

    Thanks for the heads up. Here's a copy of the word document template I am trying to pull the header data from.

    Here's a complete copy of the code as I have it so far...

    Please Login or Register  to view this content.
    Thanks again guys!

  4. #4
    Registered User
    Join Date
    09-28-2011
    Location
    Afghanistan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Grab Data From Word Header using Excel Macro

    For the Visually inclined, here is what the end product looks like. I am hung up on getting the HEADER data from the above-attached word file into excel in a way that the data can be placed in the respective columns
    Last edited by WvuSoldier; 09-29-2011 at 07:44 AM. Reason: Clarity

  5. #5
    Registered User
    Join Date
    09-28-2011
    Location
    Afghanistan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Grab Data From Word Header using Excel Macro

    Attachements didn't follow. Attached is the sample Word Document and a .JPEG of what the final product looks like (minus the Header Data, which is the crux of my issue)

    Respectfully,
    WvuSoldier

  6. #6
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Grab Data From Word Header using Excel Macro

    Please Login or Register  to view this content.

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Grab Data From Word Header using Excel Macro

    Basically this is all you need:

    Please Login or Register  to view this content.



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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