View Single Post
 
Old 09-20-2015, 12:01 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Working with horizontally merged cells means you'd probably have to loop through all cells and explicitly set their widths, one cell at a time. That also means you'll need to test each cell's width to work out whether it's too wide to fit a single column and, if so, how many columns it spans - simply testing the column index of the next cell on the row won't work, since that's always one more than the current one. This isn't too hard if the existing tables have a consistent layout but, if the column widths are all over the place (especially if the same nominal column has more than one width in an existing table), your code will also need to do some testing to work out what the current nominal column widths are - and that's made all the more difficult if auto-resizing is on.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote