Computer problems,Computer help
*AX SOFT>>>Programming & Design

How to program to copy the content from a word file to a .html file and keep the original format?


How to convert a .doc file to a .html file by programming/coding(not by manual)?

u need to know the format of word file to do that (.doc file format)

.html file is a pure text file, hence no prob creating it.

U have to read the .doc file and process it to create a .html file using simple file handling techniques.

I think u can do this program in C.

But the prob is the format of .doc file.

Just save it with a different name as a webpage.

File >> Save As
There's a choice at the bottom of the dialog that lets you save it in any format. You can do this more than once if you want two formats.

I don't quite get the question.. do you mean "keep the original format" as keeping the text formatting in the word document? Such as bold, underline, italic, font size, type, color etc??

Or something else?

If you mean the first one, I don't know, and I'd love to know..
It looks hard.. I'm just a novice programmer anyway.. but it doesn't look that easy.

The code has to be able to detect all the possible formatting in a word file (.doc document).. maybe you should try to understand how those text formatting is stored in a word document.. then try to make the code..

Program it in what language? You're not going to do it as a straight conversion - you have to generate html code to simulate Word's formatting - <strong> for bold, etc.

And that gives you deprecated code, since formatting should be done in style, not in html. The proper way is to open Word (or print the document), open your html editor and write the page by hand.

Or you could save the page as html, and then fix all the errors that Word will create.

The main problem is that you didn't know how word stores his docs into html pages, they use html code just to show the document not to understand how it's written or if a human can read it. Maybe there are some plugins or libraries that do this work but at expense of money

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Where is the best place to get free table quiz quistions????

    If this is homework, your textbook. If it's for a qualifying exam, a textbook for that exam.

    ...
  • Problems with website building?

    Dear... > You Can Use The Web View Buttone On Bottom Left Area, And See how IT Will Be After Saveing As Web. > You Don't Have To Use Ms-Word To Build A website, You Can Use Frontpage, ...

  • Creating tables in sql?

    CREATE TABLE `person` ( `id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR( 64 ) NOT NULL , `age` INT( 8 ) NOT NULL , UNIQUE ( `id` ) ) ENGINE = innodb; Simple example that works for me.

  • Ftp swf html question. First time uploading into server.?

    You can edit the .htaccess file placed in your wwwroot directory and add the line: DirectoryIndex index.html index.htm index.php Using this line you can specify (the order in) which documents...

  • I need a script that can verify if a link is on a certain page. Please read all details before answering, Thx!

    getElementsByTagName('a') will return an array of all anchor elements in the page. Compare the href attributes of those items to the requested url until you find a match or fail. <h...

  • How can market knowledge be improved for GlaxoSmithKline using the internt or the WWW??

    You're lucky girl coz i answer you : Use this .. ...

  • How to Write a SQL statement to display the repeated rows of the table below:?

    Ok, I will assume that 'topic_id' is the criteria for determining if the row is repeated (i.e. topic_id is the same on two or more items). I am giving you a generic way of dealing wit...

  • Html software doubt?

    www.w3.org has an HTML validator and a CSS validator that are great for helping you to debug your code: HTML Validator (first step) ...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster