We have had to remove Office from the servers (as microsoft dont support it) so the only way I can create word / excel through the web is using HTML using a
Print |Content-type: application/msword|
Print ||
Print |@page Section1{|
Print | size : 8.5in 11.0in; |
Print | margin : 1.0in 1.25in 1.0in 1.25in ; |
Print | mso-header-margin : .5in; |
Print | mso-footer-margin : .5in; mso-paper-source:0;|
Print | }|
Print |div.Section1 {|
Print | page : Section1;|
Print |}|
Print |l|
The problem is I need to set the header and footer. In excel you can do this by adding the following style:
Print ||
Print |@page {|
Print | mso-header-data: ‘Proprietary & Confidential’;|
Print | mso-footer-data : ‘Proprietary & Confidential’;|
Print |}|
Print ||
but for some reason this does not work in word. Has anybody sucessfully done this?
Subject: Create Word Header in HTML
The easiest way is to create whatever you want directly in Word, then save the file as HTML (or XML, or anything else you need) and cut off the part you need:)
Subject: RE: Create Word Header in HTML
Thanks but that creates a seperate file for the header and a linked xml document which you then have to reference though the style element using a URL(“”). I thought was a bit of unneccesary messing around.
If you can directly access the header / footer in Excel I assumed you should be able to do the same thing in Word although assuming things with ms products is never a good thing to do
Subject: RE: Create Word Header in HTML
Well, the header is global in Excel but it’s section-by-section in Word (and allows three different headers/footers per section: first page, left page, right page). One has to assume that the header markup would be a little more complex than a global tag.