Useful function thanks, I've saved it away, but it's more the HTML columns that are causing problems, in the way DW inserts blank tables as padding whenever a change is made. I've got around this by removing them manually so far, but it's a real pain when they keep re-appearing.