Word header/footer HTML from my app

Netnoobie

Well-known member
Joined
Feb 6, 2003
Messages
94
Location
Philadelphia
Hello all. my question may be weird, but here goes....

I am creating a Word doc with HTML. The issue came up that headers and footers are needed. Is there a way to create them without an external file (header.htm)? The Word HTML looks like:

@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-even-header:url("Doc1_files/header.htm") eh1;
mso-header:url("Doc1_files/header.htm") h1;
mso-even-footer:url("Doc1_files/header.htm") ef1;
mso-footer:url("Doc1_files/header.htm") f1;
mso-first-header:url("Doc1_files/header.htm") fh1;
mso-first-footer:url("Doc1_files/header.htm") ff1;
mso-paper-source:0;}

What I need to do is just insert the HTML into the file, and HOPE that when converted to a doc file and opened in Word that it will work properly like a header and footer. Is this even possible?

Many thanks if anyone can steer me in the right direction.
Bryan
 
bump.

I just came back to this issue and im not further. In a new doc Im stipped out everything as long as the header/footer still show up.

mso-header:url("Copy%20of%20Word%20Formatting%20Sample_files/header.htm") h1;
mso-footer:url("Copy%20of%20Word%20Formatting%20Sample_files/header.htm") f1;

And the header file:
<div style=mso-element:header id=h1>
<p class=MsoHeader>This is the header</p>
</div>

<div style=mso-element:footer id=f1>
<p class=MsoFooter>This is My Sample footer</p>
</div>


Really I dont see how I couldnt just insert the header HTML into the main page, but I jsut cant find support for it.

Bryan
 
Back
Top