+ Reply to Thread
Results 1 to 4 of 4

Copying word table formats to excel using VBA

  1. #1
    Registered User
    Join Date
    10-28-2009
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    Copying word table formats to excel using VBA

    Hey all

    First of all i would like to say this is my first ever VBA macro

    Im working on a macro that goes through some word .docx documents and copies a word table.

    The problem is i cant get it to copy the table formats over to excel, it copies all the text as it should but is loses all formating.

    Cells((iCol + RowInc), iRow) = WorksheetFunction.Clean(wdDoc.tables(TableNo).cell(iRow, iCol).Range.Text)

    This is the line i use to copy the data from word table cells to excel cells.


    Is there a easy solution to making it transfer not just the cell information but also the cell format from word??

    Eksample of the problem follows:

    Table info in word:

    Forudsætninger
    • Der skal være etableret retningslinier for tildeling af udvidede rettigheder, evt. som del af IT-sikkerhedspolitikken.
    • Der skal være udpeget en Administrator.


    Same info in excel

    ForudsætningerDer skal være etableret retningslinier for tildeling af udvidede rettigheder, evt. som del af IT-sikkerhedspolitikken. Der skal være udpeget en Administrator.



    Thanks in advance for the help.

  2. #2
    Registered User
    Join Date
    10-28-2009
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Copying word table formats to excel using VBA

    Dump, need help

  3. #3
    Registered User
    Join Date
    10-28-2009
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Copying word table formats to excel using VBA

    still needs help .. havent had time to look at the problem again but if somebody can give me some input so i have something to work with before the weekend.

  4. #4
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388

    Re: Copying word table formats to excel using VBA

    Hi

    This works for me.

    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)

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