I need to pre-format an MS page. Particularly fonts so that they are consistent with a website. MS seems to ignore at the very least the font-family MSO styles set.
I have already tried !important
and saving the word document as a web page, editing styles and using those in the original HTML file I'm trying to format on the word page.
My code:
<style>
h1 {
font-family:'Trebuchet MS', Arial, sans-serif!important;
mso-fareast-font-family:"Trebuchet MS"!important;
}
p {
font-family:"Arial",Helvetica,sans-serif!important;
mso-fareast-font-family:"Arial"!important;
}
</style>
<%
Dim file
file = "saveddocument.doc"
With Response
.Buffer = True
.ContentType = "application/msword"
.AddHeader "content-disposition", "inline; filename=" & file
.Write "<h1>This text should be formatted as Trebuchet MS</h1>" _
& "<p> This text should be formatted as Arial</p>"
.Flush
.End
End With
%>
Expected Results:
When MS Word is opened the
h1
headings should be styled with the font Trebuchet MS and thep
tags with Arial.
Current result:
Defaulting to Times New Roman
What am I missing? Any help is much appreciated.