Can't open doc file in Libreoffice: this file is from an unidentified developer
Select the file in the Finder. 
Press CMD-I to open the info window.
Find the "Open with" part, and click the triangle to open it if it's not open already.
Click the dropdown menu, and choose "other", even if the preferred app is in the list.
Then find the right app, and check "always open with".
Then click the "change all" button.


Now it should work.