That is a very real possibility, isn't it? I was deleting and inserting to test the code, but under normal circumstances, I would remove captions by selecting and deleting them manually (I also ran the delete macro in that test file). Most users wouldn't concern themselves with empty paragraphs and would just remove captions by the handiest method. Only if they had many to remove would they look for an easier solution, such as a macro, and if one were available, they might need to delete some they added afterwards, and that could create more empty paragraphs.
So a more "professional" approach would be for the code to consider empty paragraphs and insert captions for all inline shapes and tables regardless of such paragraphs.
|