Your code is removing the file extension from the name but you don't replace it with xlsx. I would set the name by
' Set the new filename
NewFile = Replace(ActiveDocument.Name, ".docx", ".xlsx")
NewFile = Replace(NewFile, "Final Report", "Tables")
I assume your code includes looping through all story ranges but you haven't shown us that outer loop. If that is the case then it will hit all footers as well.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|