If you want to verify it’s a valid Word document, then I think the only way to be sure would be to automate it with Winium. But that’s a much bigger task than verifying the document downloaded and has extension .docx.
See how far you get with the Robot class first. If you can satisfy yourself you have done enough, then that’s probably good enough. Otherwise, type Winium into the search box above.
p.s. - Maybe AutoIt will work? Not sure… never used it.