fiogf49gjkf0d How can I control the width of the columns using the custom merge script to write mailmerge tables? Below is a snip from a lengthy script I have that produces a custom product grid. The code of real interest in my question is the last line that converts the "|" delimited rows to a table. As far as I can tell, the only way to control the width of the columns (or any other formating for that matter) is with 'styles' set in the last line of code that converts to the table. I have set autofit to True and set wdAutoFitContent.
So I would like the grid to autofit its width to the content. I have a qty. column (not shown in code) that is only 4 char. long at the most, but it sizes to about 50 everytime. Do I have any options here? Thanks
... oRange.InsertParagraphAfter oRange.InsertAfter "|||||Total" & formatCurrency(sTotal) '& "|"
Set oTable = oRange.ConvertToTable("|", , , , 2, True, False, True, False, False, _ True, False, False, True, wdAutoFitContent, wdWord9TableBehavior) |