How to swap-out general table in drawing

Hi Folks,

After many years on here being a general nuisance and offering the few strands of experience I have gathered when the appropriate occasions arise, I am now looking for some help.

The last few weeks I have been working on a macro that updates a drawing sheet relative to the information entered through the custom properties tab at part/assembly level. All going well and I have made a lot of progress through filtering through previous posts.

Now I have come across an issue I cannot find a solution to. I wish to delete a general table from all sheets, and insert a new one when certain options are selected. So I'd be extraordinarily grateful if someone might be able to shed some light on this for me.

Many thanks,

Bjorn

SolidworksApi macros