GroupDocsGists
10/19/2017 - 11:07 AM

Documents-AddWatermarkWithSlidesShapeSettings.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As SlidesDocument = Document.Load(Of SlidesDocument)(Utilities.MapSourceFilePath(FilePath))
    Dim watermark As New TextWatermark("Test watermark", New Font("Arial", 19))
    watermark.IsBackground = True
    Dim shapeSettings As New SlidesShapeSettings()

    ' Set the shape name
    shapeSettings.Name = "Shape 1"

    ' Set the descriptive (alternative) text that will be associated with the shape
    shapeSettings.AlternativeText = "Test watermark"

    ' Editing of the shape in PowerPoint is forbidden
    shapeSettings.IsLocked = True

    doc.AddWatermark(watermark, shapeSettings)

    doc.Save()
End Using