Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word - How can I save a file as .html without it using CSS

Status
Not open for further replies.

opac

MIS
Jan 30, 2007
11
US
When I use MS Word(Office 2003) to save a text file as an .html file it looks fine in a browser but the code is all CSS.

Is there a way for me to change Word so it saves documents as .html and the code is actually using HTML tags instead of CSS?

Below is an example of what the code looks like when I save-as HTML with Word...
-------------------------------------
<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>n.d.,
Photograph, <st1:address w:st="on"><st1:Street w:st="on">Box</st1:Street> 21.7</st1:address>
(Students - folder 1)</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>Bowker, Samuel D.</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>n.d.,
Photographs, <st1:address w:st="on"><st1:Street w:st="on">Box</st1:Street> 21.4</st1:address>,
folder 1</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>1905, Photo
and references to him in an article &quot;Harvey Dwight Rice...&quot; in</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>Washburn
Campus and Field, v. 1 no. 4. <st1:address w:st="on"><st1:Street w:st="on">Box</st1:Street>
16.1</st1:address> (Fisk, Daniel Moses)</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>Bowker, William
(Trustee &amp; Treasurer 1865-1868)</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>n.d.,
Photograph, <st1:address w:st="on"><st1:Street w:st="on">Box</st1:Street> 21.8</st1:address>
(Trustees &amp; Regents)</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>Bowman, Dr. Karl
Murdock</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>1953, Clipping
(Honorary Degrees)</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>1956, Clipping
(Alumni)</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>Boy Scouts of <st1:country-region
w:st="on"><st1:place w:st="on">America</st1:place></st1:country-region></p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>1982, Box 2.36</p>

<p class=MsoPlainText><span style='mso-spacerun:yes'> </span>Boyd, Clara Day</p>
 
Sorry, don't have much experience with this, but I would assume that you have looked at "Web Options" under "Tools" drop down while in the "Save as" dialog box?

Member- AAAA Association Against Acronym Abusers
 
Thanks for the suggestion! Here is what I tried...

Tools/Options/General/Web Options/

Unchecked all options under Browsers

Tools/Options/General/Web Options/Encoding

Tried both Unicode (UTF-8) and US-ASCII

Still get the same results. Instead of clean HTML you get lots of CSS and MS specific fonts etc.
 
Did you try saving it as a web page filtered? It is suppose to remove the excess MS formatting. However, if you save it this way, you probably won't be able to use Word to edit the file. (So also save it as a .doc file.)

I'm not sure it this will also remove all css formatting.
 
My file is 1.5 mb. I tried just a page of it in Textism and get the same results as when trying other 3rd party apps where it basically loses some of the spacing and indenting. I have a 500 page text file that I want to convert to HTML. Word does work except that it adds all this extra code quadrupling the size of the file. It looks like I will just need to use the <pre></pre> tags as suggested in the programmer forum. It would have been nice to convert the .txt file to clean HTML though.

Thanks for the responses. I was just curious if Word had options to save files as HTML without all the extra proprietary info and CSS that quadruples the the size of the file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top