How to remove additional blank rows in footer row

This code is fine but I dont want to remove blank rows after table and figures
For reference I’am attaching the document
Please provide me code That removes blank rows which consist table footnotes.not after table

1)Please Remove this type of blank rows after table and make sure the other table should not be connected
Remove this type of blank rows.PNG (13.4 KB)

2)Please Dont Remove this Type of blank rows after Table and Figures
dont remove this type of blank row.PNG (17.7 KB)

Please provide me solution ASAP

@Syedfahad Unfortunately, your requirements are not clear enough. Please attach your source document, current and expected output. We will check the issue and provide you more information.

With this code It is removing all blank rows after Tables.it is fine
But my task is
1)Remove blank rows after Table if it consist footnotes
For example if a table contains footnote like this “Not more than 6%”. For reference I have attached document
Remove this type of blank rows.PNG (13.4 KB)

2)Please don’t Remove blank rows immediate after table if does not contains Footnote
For This scenario i’am attaching the reference document and i ahve marked for reference
don’t Remove this.PNG (3.3 KB)

@Syedfahad The code provided earlier should work for both scenarios. however, it is difficult to say what is going wrong on your side without your input MS Word document, output and expected output. To write the code it is required to analyze the document object mode, but not it’s visual representation using screenshots.