GroupDocsGists
10/19/2017 - 11:06 AM

Documents-AddImageWatermarkIntoHeaderFooter.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As CellsDocument = Document.Load(Of CellsDocument)(Utilities.MapSourceFilePath(FilePath))
    Using watermark = New ImageWatermark("D:\logo.tif")
        watermark.VerticalAlignment = VerticalAlignment.Top
        watermark.HorizontalAlignment = HorizontalAlignment.Center
        watermark.SizingType = SizingType.ScaleToParentDimensions
        watermark.ScaleFactor = 1
        doc.Worksheets(0).AddWatermarkIntoHeaderFooter(watermark)
    End Using
    doc.Save()
End Using