GroupDocsGists
10/19/2017 - 11:06 AM

Documents-AddImageWatermarkToWord.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As WordsDocument = Document.Load(Of WordsDocument)(Utilities.MapSourceFilePath(FilePath))
    Using watermark As New ImageWatermark("D:\large.png")
        ' Add watermark to all headers of the first section
        doc.Sections(0).AddWatermark(watermark)
    End Using

    ' Link all other headers&footers to corresponding headers&footers of the first section
    For i As Integer = 1 To doc.Sections.Count - 1
        doc.Sections(i).HeadersFooters.LinkToPrevious(True)
    Next

    doc.Save()
End Using