Popular posts from this blog
This Week I Learned - Week 6 2026
This Week I Learned - * "Programming is the art of making the ambiguous incredibly specific through sculpting. AI sculpting is less about vibes and more about finding the specificity you want and keeping the system stable through changes. Good SDLC practices still matter, historical context still matters, and knowing how things work matters" - Scott Hanselman * "I believe literally every prediction you hear about it (AI) is complete bunk, opinions disguised as knowledge . No one knows, which is uncomfortable, but get used to it. That's the nature of life these days in so many different ways." - Bill Shander * " Anthropic has launched plug-ins for its Claude Cowork agent to automate tasks across sales, productivity, product management, marketing, legal, finance, enterprise search, data, customer support, Bio Research, among others. Essentially, the plug-ins are built to automate specialised tasks across different functions within an organisation. Anthro...
HOW TO add a header or footer to a dynamically generated Word document
There was a question recently on my CodeProject article "Dynamically generate a MS Word document using HTML & CSS" . The article describes how to generate a Word document programmatically without using any components, by exploiting the formatting features exposed through Office XML and CSS. The questioner wanted to know how to add a custom header and footer and show something like Page X of Y (total pages). Based on what I have tried so far, showing a header and footer using Office XML in MS Word is not as easy as it is in Excel . If you want to keep the code simple & don't need any great fireworks i.e. you will just settle for page numbers in the header or footer then it's a matter of adding a few lines to the original source code. The code can be viewed at this Github Gist Update (1-Sep-2010): To add a custom header & footer, check this new post To add a footer that shows Page number at the bottom right, here are the steps - 1) Add these classes...
Comments
Post a Comment