Gobally Modify Table Row Height

W

Walter Wood

I am studying my family history and a distant cousin gave me over 150 family
group sheets with family history information. These sheets contain a lot of
tabular data, generally one table per page with a title and closing at the
top and bottom of each page.

I wanted to reprint the pages and also extract some of the data so I scanned
these sheets. Unfortunately the OCR software set most table rows to a
fixed height regardless of how many lines of data was in the row. Now I
need to figure out how to change these rows to a floating height without
doing each row/page manually. Does anyone have any suggestions on how to
change this without doing them one table at a time?

TIA
Walter Wood
 
K

Klaus Linke

Hi Walter,

OCR programs often create really wild stuff, but I hope the macro below should fix all tables (well, the row height anyway):

Dim myTable As Table
For Each myTable In ActiveDocument.Tables
myTable.Rows.HeightRule = wdRowHeightAuto
Next myTable

Regards,
Klaus
 
W

Walter Wood

Hi Klaus,

I am getting

Run TIme error '4065':
The method or property is not available because some or all of the current
selection is not in a table.

Below is what the macro looks like when I pasted in your code.

Sub TableRowHeight()
'
' TableRowHeight Macro
' Changes the height of the rows in a table
'
Dialogs(wdDialogTableRowHeight).Show
Dim myTable As Table
For Each myTable In ActiveDocument.Tables
myTable.Rows.HeightRule = wdRowHeightAuto
Next myTable

End Sub

What am I doing wrong,

Thanks for the help.
Walter



Hi Walter,

OCR programs often create really wild stuff, but I hope the macro below
should fix all tables (well, the row height anyway):

Dim myTable As Table
For Each myTable In ActiveDocument.Tables
myTable.Rows.HeightRule = wdRowHeightAuto
Next myTable

Regards,
Klaus
 
W

Walter Wood

Thanks Pat,

To create the macro I simply created a new one and pasted Klaus' language
into it. Word must have added that automatically. Removing that line did
the trick.

May thanks to both of you. You saved me hours of mouse clicks.
Walter
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top