Word documents (.docx) and PDFs can only be linked to for a separate download.
You may be creating a WordPress web page and you want to display a whole Word page.
You will then need to convert the page to an image and then insert it into your web page.
Here is a tutorial on how to do this. https://turbofuture.com/computers/How-to-Convert-Word-Document-into-Image-jpeg-png-gif-tiff