Pregunta

I have included docx file for terms and condition in our project.

Now i need to open it in new tab.

I agree to this Email campaign <a title="click to view terms and conditions" style="color:blue;" target="_blank" href="{$Site.ContentPath}/public/EmailServicesTermsofUse.docx">terms and conditions</a>.

However it is downloading the file rather than opening it new tab.

How can i achieve this. I am open for any kind of solution that will meet this condition.

Thanks in Advance!!!

¿Fue útil?

Solución 2

Most browsers by default won't load a .docx in the browser. You might have better luck hosting it as a .pdf.

Otros consejos

You can't directly view doc or docx files in html pages like PDF file.

You have to use some docx extractor to extract the contents and display it in Html Page.Provide more details about your application.

For Java Application:- docx4j is suitable for extracting docx files.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top