Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8812919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:42:56+00:00 2026-06-14T03:42:56+00:00

I’m looking for an example of a Microsoft Word Document generated by HTML. It

  • 0

I’m looking for an example of a Microsoft Word Document generated by HTML.
It should contain a header, footer and a watermark.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:42:58+00:00Added an answer on June 14, 2026 at 3:42 am

    This is some example, hope it helps others that are trying to generate ms word .doc file with HTML.

    <html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:w="urn:schemas-microsoft-com:office:word"
    xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
    xmlns="http://www.w3.org/TR/REC-html40">
    <head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><title></title>
    <style>
    v\:* {behavior:url(#default#VML);}
    o\:* {behavior:url(#default#VML);}
    w\:* {behavior:url(#default#VML);}
    .shape {behavior:url(#default#VML);}
    </style>
    <style>
    @page
    {
        mso-page-orientation: landscape;
        size:29.7cm 21cm;    margin:1cm 1cm 1cm 1cm;
    }
    @page Section1 {
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-header: h1;
        mso-footer: f1;
        }
    div.Section1 { page:Section1; }
    table#hrdftrtbl
    {
        margin:0in 0in 0in 900in;
        width:1px;
        height:1px;
        overflow:hidden;
    }
    p.MsoFooter, li.MsoFooter, div.MsoFooter
    {
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        tab-stops:center 3.0in right 6.0in;
        font-size:12.0pt;
    }
    </style>
    <xml>
    <w:WordDocument>
    <w:View>Print</w:View>
    <w:Zoom>100</w:Zoom>
    <w:DoNotOptimizeForBrowser/>
    </w:WordDocument>
    </xml>
    </head>
    
    <body>
    <div class="Section1">
    
        <p>&nbsp;</p>
    <br/>
        <table id='hrdftrtbl' border='0' cellspacing='0' cellpadding='0'>
        <tr><td>        <div style='mso-element:header' id=h1 >
            <!-- HEADER-tags -->
                <p class=MsoHeader >HEADER</p>
            <!-- end HEADER-tags -->
            </div>
        </td>
        <td>
        <div style='mso-element:footer' id=f1><span style='position:relative;z-index:-1'> 
            <!-- FOOTER-tags -->
            FOOTER
    
            <span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shapetype
             id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
             path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
             <v:formulas>
              <v:f eqn="if lineDrawn pixelLineWidth 0"/>
              <v:f eqn="sum @0 1 0"/>
              <v:f eqn="sum 0 0 @1"/>
              <v:f eqn="prod @2 1 2"/>
              <v:f eqn="prod @3 21600 pixelWidth"/>
              <v:f eqn="prod @3 21600 pixelHeight"/>
              <v:f eqn="sum @0 0 1"/>
              <v:f eqn="prod @6 1 2"/>
              <v:f eqn="prod @7 21600 pixelWidth"/>
              <v:f eqn="sum @8 21600 0"/>
              <v:f eqn="prod @7 21600 pixelHeight"/>
              <v:f eqn="sum @10 21600 0"/>
             </v:formulas>
             <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
             <o:lock v:ext="edit" aspectratio="t"/>
            </v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_s3073" type="#_x0000_t75"
             alt="VHB" style='position:absolute;
             margin-right:0pt;margin-top:-400pt;
             z-index:-1;
             visibility:visible;mso-wrap-style:square;mso-wrap-distance-left:9pt;
             mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
             mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
             mso-position-horizontal-relative:text;mso-position-vertical:absolute;
             mso-position-vertical-relative:text'>
             <v:imagedata src="https://www.google.bg/logos/2012/Rodin-2012-homepage.png"/>
            </v:shape><![endif]--></span>
               <p class=MsoFooter>
               <span style='mso-tab-count:2'></span>
               Page <span style='mso-field-code: PAGE'><span style='mso-no-proof:yes'></span> from <span style='mso-field-code: NUMPAGES'></span>
    
            <!-- end FOOTER-tags -->
       </span>
    
    
            </p>
        </div>
    
    
    
        <div style='mso-element:header' id='fh1'>
            <p class='MsoHeader'><span lang='EN-US' style='mso-ansi-language:EN-US'>&nbsp;<o:p></o:p></span></p>
            </div>
            <div style='mso-element:footer' id='ff1'>
            <p class='MsoFooter'><span lang='EN-US' style='mso-ansi-language:EN-US'>&nbsp;<o:p></o:p></span></p>
        </div>
    
        </td></tr>
        </table>
    </div>
    
    </body></html>
    

    You can adjust the watermark picture by setting width, height, margin-top, margin-right on the element v:shape id=”Picture_x0020_1″ : inline style.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
i got an object with contents of html markup in it, for example: string
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have an autohotkey script which looks up a word in a bilingual dictionary
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.