Search for tables that contain a certain paragraph style using VBA
Posted on 2015-01-27
I would like to run a macro that performs the following action:
Run thru all the tables of the current document (this document only consists of individual tables, nothing else) ...
... and search for those tables where paragraphs / cell entries are formatted with a user-defined paragraph style named 'MyTableStyle' (just one cell entry formatted with this paragraph style is enough)
A msgbox should show the index numbers of all these tables such as ... "Tables 4, 7, 9, 13 feature the user-defined paragraph style 'MyTableStyle'."
These index numbers (i.e. the msgbox text) should also be copied to a newly created document.
Help is much appreciated. Thank you very much in advance.