ProActive HowTo :: Tips & Tricks - Copying from MS Word and other web pages

MS word file used for this page.

Drag and drop from the above file.

A sample MSWord document using Microsoft quotes “enclosed in MS quotes”.

 

A sample MSWord document A sample MS Word document A sample MS Word document A sample MSWord document A sample MS Word document A sample MS Word document A sample MSWord document A sample MS Word document A sample MS Word document A sample MSWord document A sample MS Word document A sample MS Word document.  A double space after full point.

Above isunformatted.

 

 

Formattedtext

 

A sample MSWord document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MSWord document A sample MS Word document A sample MS Word document A sample MSWord document A sample MS Word document A sample MS Word document.  A double space after full point.

 

 



The code transferred using this method.

As you can see there are additional class tags - these classes are uniqies to Microsoft and may distort the appearance of your page as well as adding a great deal of extra useless weight.

<p class="MsoNormal"><span lang="EN-US">A sample MS
Word document using Microsoft quotes “enclosed in MS quotes”.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <!--[endif]-->
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">A sample MS
Word document A sample MS Word document A sample MS Word document A sample MS
Word document A sample MS Word document A sample MS Word document A sample MS
Word document A sample MS Word document A sample MS Word document A sample MS
Word document A sample MS Word document A sample MS Word document.<span>  </span>A double space after full point.
<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">Above is
unformatted.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <!--[endif]-->
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <!--[endif]-->
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Formatted
text
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <!--[endif]-->
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">A sample MS
Word <strong>document</strong> A sample MS </span><span style="font-family: "Showcard Gothic";" lang="EN-US">Word document A sample MS Word</span><span lang="EN-US"> document A sample MS Word <span style="color: yellow;">document</span> A sample MS <span style="background: red none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy:
-moz-initial;">Word document</span> A sample MS Word document A sample MS
Word document A sample MS Word document A sample MS Word document A sample MS
Word document A sample MS Word document A sample MS Word document.<span>  </span>A double space after full point.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <!--[endif]-->
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <!--[endif]-->
<o:p></o:p></span></p>


The same text correctly formatted for HTML - here we will use font instead of using styles for ease of viewing the code.

A sample MS Word document using Microsoft quotes "enclosed in MS quotes".

A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document. A double space after full point.
Above is unformatted.

Formatted text

A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document. A double space after full point.

The code for this snippet

A sample MS Word document using Microsoft quotes "enclosed in MS quotes".<br /><br />

A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document. A double space after full point. <br />

Above is unformatted.<br /><br />

Formatted text <br /><br />

A sample MS Word <strong>document</strong> A sample MS Word document A sample MS <font size="+1"><strong>Word document A sample MS Word</strong></font> document A sample MS Word <font color="#FFFF00">document</font> A sample MS <font style="background-color: Red;">Word document</font> A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document A sample MS Word document. A double space after full point.