...
Code Block |
---|
//The value of this string is the watermark string watermark = "Classified"; public void GenerateDocument() { // Create an instance of the WordApplication object WordApplication wwApp = new WordApplication(); // Open document without watermark Document doc = wwApp.Open(@"..\..\TemplatesWordTemplateFiles/PreWatermark.doc"); // Set the watermark doc.Watermark.Text = watermark; // Save the document to the Response stream wwApp.Save(doc, @"..\..\OutputWordOutputFiles\Watermarked_out.doc"); } |
...