I wonder if someone can help, I have created a bill template, that inserts Costs and Disbursements - text, amount and VAT in the relevant areas, once they have added this information the table then adjusts so that it meets another table holding the totals.
The code I have use for this is as follows:
Expand|Select|Wrap|Line Numbers
- '---------------- Resize the last row -----------------------------
- VntStartTableHeight = 0
- For counter2 = 1 To (4 + varDisb)
- Set VntEachRowHeight = ActiveDocument.Tables(1).Rows(counter2).Range
- VntStartTableHeight = VntStartTableHeight + Rangeheight(VntEachRowHeight)
- Next counter2
- ' VntStartTableHeight = Height of the table
- ActiveDocument.Tables(1).Rows.Last.HeightRule = wdRowHeightExactly
- ' Make the last row (last row height plus 124 millimetres less table height)
- ActiveDocument.Tables(1).Rows.Last.HeightRule = (MillimetersToPoints(6) + MillimetersToPoints(124)) - VntStartTableHeight
- ActiveWindow.View.Zoom.PageFit = wdPageFitBestFit
I would also like to add a message so that when the user gets to a certain amount of characters then they are warned that they are running out of space.
Please can anyone advise if this is possible...?? Any help would be greatly appreciated....