This fixes an issue where if an exception occurs while saving the docx as a pdf (ex. if the pdf file already exists and is being used by another application), then the script will exit without closing the docx. This makes the docx uneditable until the Word process is terminated.
This issue could also be present in the macOS code, although I can't confirm it because I don't have a Mac.
This fixes an issue where if an exception occurs while saving the docx as a pdf (ex. if the pdf file already exists and is being used by another application), then the script will exit without closing the docx. This makes the docx uneditable until the Word process is terminated.
This issue could also be present in the macOS code, although I can't confirm it because I don't have a Mac.