How do I make documents open in LibreOffice by default?

I’ve just cleaned my Mac of all software and have installed LibreOffice. I have some documents that I’d made in TextEdit and saved as .doc and .docx. I would like to have documents automatically open in LibreOffice, but can’t find how to do it. Also, I find that when I choose LibreOffice the document doesn’t open at all, even though the program LibreOffice is opened.

Can anyone help, please?