View to MS Word

By: ALBERT OPOKU | Asked: 04/08/2023
ForumsCategory: General questionsView to MS Word
ALBERT OPOKUALBERT OPOKU asked 2 years ago
I am displaying a view on a WP page. I want users to download the content as a . DOCX file. I will be grateful for any suggestion to make this possible. 
1 Answers
Victor Font answered 2 years ago

There's no way to do this natively. Docx files are XML. You'll have to find a PHP snippet or plugin that can convert a view's html output to docx. Here's an example: https://code-boxx.com/convert-html-to-docx-using-php/

ALBERT OPOKUALBERT OPOKU replied 2 years ago

Thank you a lot, Victor. I also found that i could do it with Javascript - https://www.codexworld.com/export-html-to-word-doc-docx-using-javascript/

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right