Consulting

Results 1 to 3 of 3

Thread: VBA - Word or PDF into Excel

  1. #1
    VBAX Newbie
    Joined
    Mar 2018
    Posts
    1
    Location

    VBA - Word or PDF into Excel

    I am quite new to VBA and could already google and found out how to transform the tables from Word into Excel, even when they are more then one of them included.
    I have the following problem:
    -tables with merged cells and normal cells in Word or PDF (can be 1 or more tables) should be inserted into a Excel file in the same directory with the same format of the tables (like a screenshot from the previous files)
    -the whole directory of Word or PDF files located in a folder should be selected and procedured, and the Excel file (all Word and PDF files in exactly one Excel file) should open for each file a new tab, where the content gets inserted.
    It would be really kind if you could help me.
    Cheers.

  2. #2
    VBAX Mentor
    Joined
    Aug 2012
    Posts
    367
    Location
    do you need to see the tables or to interact with the data in the tables?
    converting from pdf tables to excel tables has, in my experience, been rather difficult, although I am by no means a pro at this.
    Remember: it is the second mouse that gets the cheese.....

  3. #3
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    The simplest approach is to use an automated copy/paste. When doing that with Word data sources, though, that will result in Word cells with multiple paragraphs being transformed into multiple cells in Excel. There are workarounds, for that. With PDFs, though, not only do you have the issue of PDF automation (unless your Word version supports PDF opening), but also the vagaries of how even wrapped lines in cells are handled by PDF creators. What one often finds is that every line in a logical cell becomes its own cell in a PDF. PDF table columns can be all over the place, too.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •