Hi Naveen,
Thanks for being patient. Regarding WORDSNET-12057, our product team has completed the work on your issue and has come to a conclusion that they will most likely won’t be able to implement the fix to your issue. Your issue (WORDSNET-12057) may be closed with ‘Won’t Fix’ resolution.
In MS Word there is no any special property for watermark. Watermark in MS Word is a simple shape inserted into the header. However, you can identify this shape in order to get/set its properties. You can use Shape.Name to achieve this because when you insert a watermark in MS Word, it sets name of shape like this – “PowerPlusWaterMarkObject357476642”. So if the name of shape contains “WaterMark” substring, you can suppose that this shape is a watermark.
So you can use code like the following to get a watermark shape:
//
Open document.
Document doc = new Document(MyDir + @"watermark.docx");
//
Get all shapes form the document.
NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
//
Look for watermark shape.
foreach (Shape shape in shapes)
{
if (shape.Name.Contains("WaterMark"))
{
// Here
you can access watermark shape properties.
//
..............................................
// For
example printe text of the watermark.
Console.WriteLine(shape.TextPath.Text);
}
}
I hope, this helps.
Best regards,