M
Matthew Williams
Hi
I've written a macro that converts all the tables in a document to text by merging the cells in each column and then converting the whole table to text. It works on simple tables and even some more complex ones, but in tables that have a lot of merged cells, it fails.
To allow the macro to skip complex tables and continue executing, I've written an errorhandler that seems to work for the most part, but I have run into one table that cannot be converted and that does not invoke the errorhandler. I get a run-time 5991 error ("Cannot access individual rows in this collection because the table has vertically merged cells").
Does anyone have any insight as to why this error does not invoke the error handler while other errors do (I know it's working because another table in the document before this one throws a different error)? Is there a way to get around this error? I'm not particularly worried about converting the table, but I would like to be able to bypass it.
Thanks
m.
I've written a macro that converts all the tables in a document to text by merging the cells in each column and then converting the whole table to text. It works on simple tables and even some more complex ones, but in tables that have a lot of merged cells, it fails.
To allow the macro to skip complex tables and continue executing, I've written an errorhandler that seems to work for the most part, but I have run into one table that cannot be converted and that does not invoke the errorhandler. I get a run-time 5991 error ("Cannot access individual rows in this collection because the table has vertically merged cells").
Does anyone have any insight as to why this error does not invoke the error handler while other errors do (I know it's working because another table in the document before this one throws a different error)? Is there a way to get around this error? I'm not particularly worried about converting the table, but I would like to be able to bypass it.
Thanks
m.