Thanks for checking this out for me.

I tried the code with the adjustments made but it still ran into an error when saving the document .