

InsertFromBuildingBlocks(headerFooter.Range) ĭ_SeekView(WdSeekView. ? WdSeekView.wdSeekCurrentPageHeader:WdSeekView.wdSeekCurrentPageFooter) foreach (Section sec in document.Sections)įoreach (HeaderFooter headerFooter in sec.GetHeadersFooters())ĭ_SeekView(headerFooter.IsHeader If you are inserting your shape through code you need to take care of it. I had my image in building blocks with correct height, width and position so my code just inserts it and always displayed in the middle. If you have different first page header, odd and even page header you need to do it for each type of headers in every section. When you use VSTO you need to seek in to Header and then add the shape. To change the font, style, or color, select WordArt Styles on the Format tab, click Format WordArt, and then click the Colors and Lines, Size or Layout tabs. Enter your text in the Edit WordArt Text window, select the font and style, and click OK. Yes Watermark is just a shape being inserted in to document. Click the master page you want to add the watermark to, and then on the ribbon Insert > WordArt. If InStr(1, shp.Name, "WordArt") 0 Or InStr(1, shp.Name, "Power") 0 Then RelativeVerticalPosition = Word.wdRelativeVerticalPositionMarginĮDIT And just encase you wanted to replace existing watermarks here is another bit of useful code, to find watermarks. The problem occurs whether I create a watermark while editing the page, a header, or a footer. I noticed that any watermark I add to a document or template only shows in the page area when I open a header or footer.

RelativeHorizontalPosition = Word.wdRelativeHorizontalPositionMargin The watermark feature was working fine with Word 2013 until recently, although I cannot say when it started to fail. Set shp = (msoTextEffect2, "Evaluation Only", "Tahoma", 10, False, False, 0, 0) Sub SetWatermarks()ĭim scn As Word.Section, hdft As Word.HeaderFooter, shp As Word.Shape This may prove helpful: ( Taken from here) Although it is for 2010 it may prove useful to you.
