Click here to Skip to main content
15,607,524 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

how to print a word document using javascript?


<A HREF="javascript:window.print()">Click to Print This Page</A>
Share this answer
hasbina 27-May-13 5:52am    
first i want to open a word document from client side and it should work in all browsers.
siddharthrainit 27-May-13 5:59am    
<iframe src="your document path"></iframe>

to open the your document it will work in all browser
siddharthrainit 27-May-13 6:03am    
<input önclick="window.print()" type="button">click<input>
<iframe src="" style="width:100%; height:500px;"></iframe>
hasbina 27-May-13 7:42am    
i want to open a document in button click then get print that doucment only.
Refer - Print word document through Javascript[^]
Javascript has no such functionalities to directly print office documentations. However, you can try opening the word document in an iframe. And use window.print to print the whole page.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900