Hello Don,
My application has different components which will send html pages to the
framework which then has to include(insert) all these html pages and show it
in word document.
yes indeed each html page returned by the individual component has the CSS
file, it'll look like as below:
<style type="text/css">
<!--
A { color: Blue; }
A:active,
A:hover { color: Red; }
A:visited { color:Purple; }
table
{
font-size: 10pt;
font-family: Arial;
border-right: #696969 1px solid;
border-top: #696969 1px solid;
border-left: #696969 1px solid;
border-bottom: #696969 1px solid;
}
.TabHead
{
height: 12px;
font-weight: bold;
background-color: #ccff66;
}
ul
{
margin-top: 0pt;
margin-bottom: 2pt;
}
li
{
list-style-position: outside;
font-size: 10pt;
font-family: Arial;
margin-top: 0pt;
margin-bottom: 0pt;
}
.liTab
{
text-indent: -20px;
list-style-type: circle;
}
tr
{
}
.oddrow
{
background-color: #faffef;
}
.evenrow
{
background-color: #ffffff;
}
.mmirow
{
background-color: #99ff00;
}
td
{
padding-left: 4pt;
border-right: #a9a9a9 1px ridge;
border-top: #a9a9a9 1px ridge;
border-left: #a9a9a9 1px ridge;
border-bottom: #a9a9a9 1px ridge;
vertical-align: top;
}
.tdright
{
text-align: right;
}
h3
{
font-family: Arial;
}
h4
{
font-size: 10pt;
font-family: Arial;
margin-top: 11pt;
margin-bottom: 5pt;
font-weight: bold;
text-transform: capitalize;
}
p
{
font-size: 10pt;
font-family: Arial;
text-indent: 0pt;
text-align: left;
margin-top: 0pt;
margin-bottom: 0pt;
}
.dist2pt
{
margin-top: 2pt;
margin-bottom: 2pt;
}
div
{
font-size: 10pt;
font-family: Arial;
}
.dbold
{
font-weight:bold;
}
-->
</style>
Right now, Web Browser is displaying the text exactly at the position where
i want to be...but Word document is somehow missing this positioning
information.
I suspect this is because the advanced html tags like <DIV> <SPAN> and
attributes like STYLE cannot be recognised by Word document. If we use basic
html tags like <PRE>, <P> its showing correctly in both IE and WORD.
Please let me know what i have to do to have a consistent proper view in
both IE and WORD?
Regards,
Ram.
> =?Utf-8?B?UmFtIEt1bWFyIEthcm5hdGFrYQ==?=
> <RamKumarKarnataka@discussions.microsoft.com> wrote in
[quoted text clipped - 53 lines]
> monitor types and sizes these days (and have been for some years) and
> your assuming that everybody has the identical monitor that you do!
Don - 27 May 2008 12:32 GMT
=?Utf-8?B?UmFtIEt1bWFyIEthcm5hdGFrYQ==?=
<RamKumarKarnataka@discussions.microsoft.com> wrote in
news:FE49756C-71C6-4C85-821D-59D38434CF87@microsoft.com:
> Hello Don,
> My application has different components which will send html pages to
[quoted text clipped - 17 lines]
> Regards,
> Ram.
Don't believe it's possible.
Bob Buckland ?:-) - 29 May 2008 00:20 GMT
Hi Ram,
The ability to attach external CSS style sheets to Word a Word file came after Word 2000. Word 2000 was the first of the 'round trip
to web document and back to Word document' versions and has a few more quirks than later versions.
A good portion of the the .CSS file you posted has equivalents in Word 2000 so what you may want to try is to
(a) Install the Office 2000 HTML Filter to enable
File=>Export to=>Compact HTML (known in later Word versions as a built in, Web Page-Filtered choice.
http://microsoft.com/downloads/details.aspx?FamilyID=209ADBEE-3FBD-482C-83B0-96F
B79B74DED&displaylang=en
(b) Create the page/content look you want in Word 2000 using Word styles and possibly a table to position the text and graphic,
then save the page in Word 2000 as both 'HTML' and as 'Web page' and look at the source to see how Word created the result,
including its internal CSS (i.e. what it recognizes) then mimic that in the pages you're creating to feed back to Word. Also
verify that Word recreates the document from Word the same when reopened in Word. It may not do so if you save using the filter.
Word's behavior from inserting a file vs opening one can be different.
=================
Hello Don,
My application has different components which will send html pages to the
framework which then has to include(insert) all these html pages and show it
in word document.
yes indeed each html page returned by the individual component has the CSS
file, it'll look like as below:
<style type="text/css">
<!--
A { color: Blue; }
A:active,
A:hover { color: Red; }
A:visited { color:Purple; }
table
{
font-size: 10pt;
font-family: Arial;
border-right: #696969 1px solid;
border-top: #696969 1px solid;
border-left: #696969 1px solid;
border-bottom: #696969 1px solid;
}
.TabHead
{
height: 12px;
font-weight: bold;
background-color: #ccff66;
}
ul
{
margin-top: 0pt;
margin-bottom: 2pt;
}
li
{
list-style-position: outside;
font-size: 10pt;
font-family: Arial;
margin-top: 0pt;
margin-bottom: 0pt;
}
.liTab
{
text-indent: -20px;
list-style-type: circle;
}
tr
{
}
.oddrow
{
background-color: #faffef;
}
.evenrow
{
background-color: #ffffff;
}
.mmirow
{
background-color: #99ff00;
}
td
{
padding-left: 4pt;
border-right: #a9a9a9 1px ridge;
border-top: #a9a9a9 1px ridge;
border-left: #a9a9a9 1px ridge;
border-bottom: #a9a9a9 1px ridge;
vertical-align: top;
}
.tdright
{
text-align: right;
}
h3
{
font-family: Arial;
}
h4
{
font-size: 10pt;
font-family: Arial;
margin-top: 11pt;
margin-bottom: 5pt;
font-weight: bold;
text-transform: capitalize;
}
p
{
font-size: 10pt;
font-family: Arial;
text-indent: 0pt;
text-align: left;
margin-top: 0pt;
margin-bottom: 0pt;
}
.dist2pt
{
margin-top: 2pt;
margin-bottom: 2pt;
}
div
{
font-size: 10pt;
font-family: Arial;
}
.dbold
{
font-weight:bold;
}
-->
</style>
Right now, Web Browser is displaying the text exactly at the position where
i want to be...but Word document is somehow missing this positioning
information.
I suspect this is because the advanced html tags like <DIV> <SPAN> and
attributes like STYLE cannot be recognised by Word document. If we use basic
html tags like <PRE>, <P> its showing correctly in both IE and WORD.
Please let me know what i have to do to have a consistent proper view in
both IE and WORD?
Regards,
Ram. >>

Signature
Bob Buckland ?:-)
MS Office System Products MVP
*Courtesy is not expensive and can pay big dividends*