Adding HTML to a document

I am using Aspose v3.1.5.0 to mailmerge some documents. After the mailmerge is complete I want to add some HTML to the page (actually I would prefer to add a full watermark to the background of the page) and its not working. Here is a code snippet:

aspose.DocumentBuilder docbuilder = new Aspose.Word.DocumentBuilder(doc); docbuilder.InsertHtml(“

THIS DOCUMENT IS NOT TO BE PRINTED”);
docbuilder.Writeln(“This document is for preview only and should not be printed”);
doc.Protect(Aspose.Word.ProtectionType.AllowOnlyComments);
doc.Save(folder + fileName);

I noticed that even tho the HTML and text does not appear, I see that the red text watermark for my demo version of the control appears twice at the top of the page.

Am I doing something wrong?

Never mind it started working all of a sudden!

Still would be great if I could put a watermark light gray text on the background of the entire document.

Regards,
Brett

Hi,

If inserting a watermark image rather than text is applicable for you, you can take a look at the Stamp and Watermak demo and implement the same in your code.