Copy and Paste Word document to HTML form
Posted by admin | Under HTML Wednesday Jun 15, 2011Many users without computer knowledge copy contents from a word document, and paste them into a HTML form (<textarea></textarea>) and expect to retain formating as well as special characters such as smart quotes and emdashes. You may opt to translate smart quotes to regular quotes and emdashes to regular dashes with a PHP script. If any user submits a non-ASCII character contents, you’ll probably see weird characters in the database and HTML page. Finding and fixing just a few of them (curly quotes and em dashes) isn’t going to solve the real problem.
How do you go about resolving this problem? One way to solve the problem is by educating the users to convert the special characters into ASCII text and submit them into the form. To convert special characters, you may use any of the following methods.
1. Save the word document as a HTML document. Microsoft Word has an option to save .DOC document into a .HTML file. Select the contents from the HTML document, and paste them into the HTML form.
2. Copy the Word contents, and paste them into a notepad; then select the same contents from the notepad, copy and paste them into the HTML form.










I made an attempt to save MS Word file to HTML, but the result was very disappointing. MS Word 2007 offered to save the file as a web page, but it adds extraneous MS Office tags that clutters the HTML source. Saving as a “web page, filtered” provided much cleaner HTML, but it still added much unneeded MS office tags. Microsoft needs to understand that a typical web developers do NOT want MS Office specific styles in the web pages.
It´s a common problem and sometimes advanced user have it. The suggested method works fine and there are several ways to solve it.
I don´t have problems to copy text from Word to Html form, even with special characters. I am using Clickto app, it is a freeware and works very well. It is easy to work just press CTRL + C and the apps.