How to save document with different name, if certain row contains a special character?
I may not be understanding the question. Are you asking how to change the document name, or how to properly check for the "*" character?
Changing the name is simple; just use a variable.
docname = "test.docx"for idx, item in enumerate(vars): cells = table.add_row().cells cells[0].text = info[idx] # gets the option name val = item.get() #radiobutton value if val == 2: # checks if yes cells[1].text = "*" elif val == 1: # checks if no cells[2].text = "*" docname = "failed.docx" elif val == 0: # checks if N/A cells[3].text = "*" docname = "failed.docx"document.save(docname)