Adding headers/footers and watermarks to office documents

Add-in Express™ Support Service
That's what is more important than anything else

Adding headers/footers and watermarks to office documents
 
Uri Steinfeld




Posts: 2
Joined: 2016-03-24
Hello Add-in-express team.
One of our clients asked us if we can add classification capabilities into office documents in the form of headers/footers and watermarks.
The requirement is to be expose buttons on the ribbon and when the user press a button, we would either add a watermark, a header/footer or both to the document, immediately showing it to the end user.
Our need is to support word,excel and powerpoint starting from version 2010.
Any samples that you might have would be great.

Regards,
U.
Posted 11 May, 2016 02:05:16 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Uri,

Headers and footers in Word, Excel and PowerPoint can be added by using their Object Model capabilities. Please see the links below for more information.

Headers and Footers in Word:
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.headerfooter%28v=office.14%29.aspx
https://msdn.microsoft.com/en-us/library/ms178795.aspx

Headers and Footers in Excel:
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.pagesetup_members%28v=office.14%29.aspx
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.pagesetup.leftheader%28v=office.14%29.aspx
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.pagesetup.leftfooter%28v=office.14%29.aspx
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.pagesetup.centerheader%28v=office.14%29.aspx
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.pagesetup.centerfooter%28v=office.14%29.aspx
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.pagesetup.rightheader%28v=office.14%29.aspx
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.pagesetup.rightfooter%28v=office.14%29.aspx

Headers and Footers in PowerPoint:
https://msdn.microsoft.com/en-us/library/office/ff745540%28v=office.14%29.aspx

As for watermarks, I don't remember that Office applications support this feature directly. Probably you will have to add some picture to every page of a Word document and to each PowerPoint slide. In Excel, you can try to use the PageSetup.CenterHeaderPicture or PageSetup.CenterFooterPicture properties.
Posted 11 May, 2016 09:13:22 Top