When working with my ms word 2010 document, I often use the includetext-function to incorporate HTML content:
{ INCLUDETEXT "test.html" }
Here is an example of the HTML code that I am trying to include:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
line-height: 100%;
}
p {
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<p>Line 1<br/>Line 2</p>
</body>
</html>
However, despite my efforts, I have been unable to format paragraph spacing within the HTML/CSS that will display correctly in Word. The margin and padding properties do not seem to work as expected. While other CSS properties such as font and color are functioning properly.
In Word, if I remove the <p>
tags, paragraph spacing defaults to 10 pt, but when the <p>
tags are present, the spacing changes to "auto", causing issues throughout my entire document.
Can anyone suggest a CSS property that is compatible with Word to define paragraph spacing effectively?
Thank you for your assistance.
(Note: This scenario involves XML with an XSLT stylesheet, however, it has been simplified for demonstration purposes)