Using Word 97 in Windows 95/98.
I need to convert a lot of tables to have the same overall width. They are all 2 columns, but the columns are not all the same width. The first columns give a term which vary a good bit in length. The second column will be shorter when the first column is longer. Right now the second columns are all too long, going past the page margins (they are output from a conversion from HTML-based help).
In essense, the following steps show what I want to happen (If you have a better way of accomplishing the same goal, feel free.):
1. For every two column nonbordered table in the document.
2. Find the width of the first column.
3. Find the width of the second column.
4. Add the widths together.
5. Subtract the sum from 390 pt. (for example 100+400=500; 390-500=-110 [table too wide])
6. If the result is negative (this will be true when the original table is wider than 390 pt), subtract the difference to the width of the second column.
7. If the result is positive (this will be true when the original table is narrower than 390 pt), add the difference to the width of the second column.
8. Go to the next table…until the end of the document.
Thanks for your help!!
Troy
P.S. This Saturday I start Visual Basic 6.0 class. Hopefully I’ll be able to start doing some of this for myself and helping others soon.