Well, this isn't a complete solution but it works for tables and you could do something similar for entire documents. - Anton