Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Ram Kumar Karnataka Ram Kumar Karnataka is offline
external usenet poster
 
Posts: 8
Default Problem while inserting a html page into word2000 document

Hello All,
I'm facing a problem while inserting a html page into the word2000 document.
The speciality of the html page is - it contains images with text. The text
is separated from the image to facilitate easy localization.

The problem arises when i insert the html page into the word, the text which
should be positioned at certain places along side the image are all coming at
the bottom of the image, which makes the image not readable.

If i open the same html page using the webbrowser, its absolutely fine. The
text is embedded inside the div and span tags.

The html will look like as shown below:

img src="file://C:\ABC.ico" alt="ABC" style="position: relative; left: 4px;
top: 12px; width: 395px;" /
div style="width: 247px; height: 12px; position: absolute; left: 75px; top:
10px;"span style="color: #ff3333"
strongSample image/strong/span/div
div style="width: 49px; height: 12px; position: absolute; left: 343px; top:
190px;" X-Axis
/divdiv style="width: 243px; height: 23px; position:
absolute; left: 78px; top: 192px;"
point
/div
/div/div
divbr /pFilter points/ptabletr class="TabHead"tdNo./td
tdDescription/tdtdRange/tdtdDefault/tdtdValue/td/trtrtdS.1.3/td
tdfilter time period/tdtd0 ... 600 Min/td
td60 Min/td
td60 Min/td
/tr
/table
/div

Indeed, the problem seems to be like Word is not preserving the position
information of texts in "div" element and style attributes.

Can anyone please help in this regard?

Thanks
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Bob Buckland ?:-\) Bob   Buckland ?:-\) is offline
external usenet poster
 
Posts: 2,073
Default Problem while inserting a html page into word2000 document

Hi Ram,

While it's a bit difficult to know how the whole thing would behave without having a link to the full HTML page and a picture of how
it shoudl look g it appears that some of the differences between how Word and IE handle HTML is coming into play.

With only a couple of minutes to look at it, it *may* be that the graphic in this case, when the .htm file is opened or inserted
into Word, comes in as 'inline with text' (i.e. it's treated like a large text character) and as Word has already placed the graphic
as part of the text flow the text that it then reads from your file is placed after it.

Word 2000 was the first implementation of internal handling of HTML by Word and it wasn't quite as refined as later versions of
Word, at least as far as using CSS for positiong, but the behaviors in Word and IE aren't identical and would give similar results
in later Word versions.
http://support.microsoft.com/kb/212270

If you create the same layout in Word in Web Layout view and then preview in browser and view source you can see how Word would
'code' for the layout. When you save a web document from Word it preserves all of the elements it needs to render it again in Word
like the original Word document, but not necessarily the other way around .

If you have the file open in IE and use File=Edit with Microsoft Word then in Word go to File=Web Page Preview it appears that
Word has preserved the placement CSS.

===============
"Ram Kumar Karnataka" wrote in message
...
Hello All,
I'm facing a problem while inserting a html page into the word2000 document.
The speciality of the html page is - it contains images with text. The text
is separated from the image to facilitate easy localization.

The problem arises when i insert the html page into the word, the text which
should be positioned at certain places along side the image are all coming at
the bottom of the image, which makes the image not readable.

If i open the same html page using the webbrowser, its absolutely fine. The
text is embedded inside the div and span tags.

The html will look like as shown below:

img src="file://C:\ABC.ico" alt="ABC" style="position: relative; left: 4px;
top: 12px; width: 395px;" /
div style="width: 247px; height: 12px; position: absolute; left: 75px; top:
10px;"span style="color: #ff3333"
strongSample image/strong/span/div
div style="width: 49px; height: 12px; position: absolute; left: 343px; top:
190px;" X-Axis
/divdiv style="width: 243px; height: 23px; position:
absolute; left: 78px; top: 192px;"
point
/div
/div/div
divbr /pFilter points/ptabletr class="TabHead"tdNo./td
tdDescription/tdtdRange/tdtdDefault/tdtdValue/td/trtrtdS.1.3/td
tdfilter time period/tdtd0 ... 600 Min/td
td60 Min/td
td60 Min/td
/tr
/table
/div

Indeed, the problem seems to be like Word is not preserving the position
information of texts in "div" element and style attributes.

Can anyone please help in this regard?

Thanks
--

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Ram Kumar Karnataka Ram Kumar Karnataka is offline
external usenet poster
 
Posts: 8
Default Problem while inserting a html page into word2000 document

Hello Bob,
Its not only image creating the problem but even with simple html text with
div tag and "style" attributes have a problem.
For example, pls have look at the below html code:

html
div style="width: 247px; height: 12px; position: absolute; left: 150px;
top: 100px;"
span style="color: #ff3333"
strongfiltered outside air temperature/strong
/span
/div
/html


This html when opened in IE preserved the positioning info whereas word
doesnt.

Can you please suggest some html tags which can be recognized by both IE and
MS Word so that the text/image comes exactly at the specified location?

Thanks

Regards
Ram.



"Bob Buckland ?:-)" wrote:

Hi Ram,

While it's a bit difficult to know how the whole thing would behave without having a link to the full HTML page and a picture of how
it shoudl look g it appears that some of the differences between how Word and IE handle HTML is coming into play.

With only a couple of minutes to look at it, it *may* be that the graphic in this case, when the .htm file is opened or inserted
into Word, comes in as 'inline with text' (i.e. it's treated like a large text character) and as Word has already placed the graphic
as part of the text flow the text that it then reads from your file is placed after it.

Word 2000 was the first implementation of internal handling of HTML by Word and it wasn't quite as refined as later versions of
Word, at least as far as using CSS for positiong, but the behaviors in Word and IE aren't identical and would give similar results
in later Word versions.
http://support.microsoft.com/kb/212270

If you create the same layout in Word in Web Layout view and then preview in browser and view source you can see how Word would
'code' for the layout. When you save a web document from Word it preserves all of the elements it needs to render it again in Word
like the original Word document, but not necessarily the other way around .

If you have the file open in IE and use File=Edit with Microsoft Word then in Word go to File=Web Page Preview it appears that
Word has preserved the placement CSS.

===============
"Ram Kumar Karnataka" wrote in message
...
Hello All,
I'm facing a problem while inserting a html page into the word2000 document.
The speciality of the html page is - it contains images with text. The text
is separated from the image to facilitate easy localization.

The problem arises when i insert the html page into the word, the text which
should be positioned at certain places along side the image are all coming at
the bottom of the image, which makes the image not readable.

If i open the same html page using the webbrowser, its absolutely fine. The
text is embedded inside the div and span tags.

The html will look like as shown below:

img src="file://C:\ABC.ico" alt="ABC" style="position: relative; left: 4px;
top: 12px; width: 395px;" /
div style="width: 247px; height: 12px; position: absolute; left: 75px; top:
10px;"span style="color: #ff3333"
strongSample image/strong/span/div
div style="width: 49px; height: 12px; position: absolute; left: 343px; top:
190px;" X-Axis
/divdiv style="width: 243px; height: 23px; position:
absolute; left: 78px; top: 192px;"
point
/div
/div/div
divbr /pFilter points/ptabletr class="TabHead"tdNo./td
tdDescription/tdtdRange/tdtdDefault/tdtdValue/td/trtrtdS.1.3/td
tdfilter time period/tdtd0 ... 600 Min/td
td60 Min/td
td60 Min/td
/tr
/table
/div

Indeed, the problem seems to be like Word is not preserving the position
information of texts in "div" element and style attributes.

Can anyone please help in this regard?

Thanks
--

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting HTML into word 2003 and having it display as web page cbima Page Layout 1 March 7th 06 10:00 PM
Inserting HTML into word 2003 using VB.NET Sylvain Microsoft Word Help 1 November 29th 05 05:51 PM
Problem Inserting Picture Into Word Document..... Tom Massfeller Microsoft Word Help 5 August 27th 05 10:36 PM
ms-word creates html dash problem for front page jack w. bonney vancouver Microsoft Word Help 10 July 11th 05 05:55 PM
problem with word2000 murlis New Users 1 December 6th 04 01:18 PM


All times are GMT +1. The time now is 10:12 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"