Skip to main content
Known Participant
June 19, 2007
Question

Import from Word with long tables

  • June 19, 2007
  • 1 reply
  • 528 views
Evidently RH cannot break up tables. If a heading level (e.g., heading 4) is always contained in table cells, then it cannot be selected to create new topics during the import.

Do you have any recommendation for this other than change the original word document and manually cut the tables at the required spots?
    This topic has been closed for replies.

    1 reply

    June 19, 2007
    Is the heading 4 tag only in the cells where you want the table to break? Is only the one cell populated in each of those rows?

    Brian
    June 20, 2007
    If your table is similar to this:
    Columns 3-x
    Row 1, cell1 header text
    Row 2, all columns with data
    Row 3 etc as row 2
    Row 12 (example) 2nd header text
    and so on, the following macro will find each header, select the row, convert tabe to text, re-apply the heading level.

    You can specify the heading level you want.

    Sub SplitTable()
    Selection.Find.ClearFormatting
    Selection.Find.Style = ActiveDocument.Styles("Heading 4")
    With Selection.Find
    Do While Selection.Find.Execute
    Selection.SelectRow
    Selection.Rows.ConvertToText Separator:=wdSeparateByTabs, NestedTables:=True
    'Change the heading level here to what you require
    Selection.Style = ActiveDocument.Styles("Heading 4")
    Loop
    End With
    End Sub

    Place the macro in your template .dot file.
    Open the document and run the macro.

    Hope this helps,

    Brian

    PS. If you are not sure about installing the macro, see this article.
    July 3, 2007
    Thanks for your help and please excuse the late reply. I had to suscribe with a new login now because my old account somehow vanished..