It seems the macro does not tend to like the tables. This is ordinary each time you have to look into a cell to ensure what is the style.
according to me, here is a fix so that you are able to skip the tables , you need to replace the corresponding For/Next routine) :
Code:
While oEnum.hasMoreElements
thisElement = oEnum.nextElement
Do
For i = 0 to uBound(inUse())
If thisElement.supportsService("com.sun.star.text.Paragraph") Then
If inUse(i) = thisElement.ParaStyleName then Exit Do
Else
exit Do
End if
Next
Bookmarks