Yes. In Word for Microsoft 365 on Windows, you can use VBA to add a text watermark by placing a rotated WordArt shape in each section’s primary header. For a one-off watermark, Word’s built-in Design > Watermark command is simpler; use a macro when you need a repeatable, customized process.
What a Word watermark is
A watermark is usually pale text or an image positioned behind the main content on a page. Common examples include DRAFT, CONFIDENTIAL, and a company logo. In Word, the watermark is typically stored as a floating object in a header, rather than as text inserted into every paragraph. That lets the same object appear across pages while leaving the body text available for editing.
This distinction matters when choosing how to add one. A macro that inserts the word DRAFT into the body would change the document’s text and layout. A header shape acts as a visual background element instead. It can still be selected and edited, so it is not a security feature: a recipient may remove it, and it does not prevent copying or editing the document.
Use the built-in command or VBA?
For most documents, the built-in command is the best starting point. In Word for Microsoft 365 on Windows, open Design > Watermark. Choose a ready-made option, or select Custom Watermark to create a text or picture watermark. The available choices and dialog layout can vary somewhat by Word release. In Word for Mac, look for Watermark on the Design tab; ribbon details can differ by version.
Use VBA when you need to apply the same treatment repeatedly, set a particular color or angle, or run a consistent operation across sections. A macro is also useful as a starting point for a larger document-production workflow. It is less suitable if you only need to mark a single file, if macros are blocked by your organization, or if the document has complicated first-page and odd/even header settings that need special handling.
The macro below creates a gray, diagonal DRAFT watermark. It works on the active document’s primary header in every section. It removes only earlier shapes with the name used by this macro before adding replacements; it does not remove unrelated header content or other watermarks.
VBA macro to add a text watermark
Before running any macro, save a copy of the document. Macros cannot be undone with Ctrl+Z, so check the result in the copy first. The code is intended for Word on Windows and uses Word and Office VBA constants available in the desktop application.
Sub AddVbaTextWatermark()
Dim sec As Section
Dim hdr As HeaderFooter
Dim shp As Shape
Dim i As Long
Dim watermarkText As String
watermarkText = "DRAFT"
For Each sec In ActiveDocument.Sections
Set hdr = sec.Headers(wdHeaderFooterPrimary)
hdr.LinkToPrevious = False
' Remove this macro's previous watermark from this header.
For i = hdr.Shapes.Count To 1 Step -1
If hdr.Shapes(i).Name = "VbaTextWatermark" Then
hdr.Shapes(i).Delete
End If
Next i
' Add a WordArt shape anchored in the header.
Set shp = hdr.Shapes.AddTextEffect( _
msoTextEffect1, watermarkText, "Arial", 54, False, False, 0, 0)
With shp
.Name = "VbaTextWatermark"
.Rotation = 315
.WrapFormat.Type = wdWrapBehind
.WrapFormat.AllowOverlap = True
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
.Left = wdShapeCenter
.Top = wdShapeCenter
.Width = InchesToPoints(6)
.Height = InchesToPoints(1.5)
.Fill.ForeColor.RGB = RGB(190, 190, 190)
.Fill.Transparency = 0.45
.Line.Visible = msoFalse
End With
Next sec
End Sub
The code separates headers between sections before adding shapes. This avoids relying on a linked header to hold a separate watermark for every section. Because it changes header linkage, review the headers in the saved copy, especially if the document already uses different headers in different sections.
How to run the macro in Word
- Open the document and save a separate copy for testing. If you want to retain the macro in the file, save it as a Word Macro-Enabled Document (.docm). A regular .docx file does not store VBA macros.
- Open the VBA editor with Alt+F11 on Windows. You can also use the Developer tab’s Visual Basic command if that tab is visible. If Developer is missing, enable it through File > Options > Customize Ribbon and select Developer.
- In the editor, choose Insert > Module, then paste the code into the module window. Return to Word.
- Run the macro with Alt+F8, select AddVbaTextWatermark, and choose Run. Alternatively, run it from the VBA editor while the procedure is selected.
- Inspect several pages, including pages after section breaks, and save the document. Check print preview or export a PDF if the final file will be distributed that way.
On a Mac, the VBA editor and shortcut availability depend on the keyboard and Word version; some keyboards require Fn with the function-key combination. Word for Mac supports VBA, but this example is written for Windows and should be checked on a copy before use there. Menu labels and some object behavior can differ. If the macro is blocked, follow your organization’s macro policy rather than lowering security settings to allow all macros.
Change the text, color, angle, and size
The simplest edit is to replace DRAFT in the assignment to watermarkText. For example, use REVIEW COPY or CONFIDENTIAL. Keep the text short: long labels may extend beyond the page or become difficult to read when rotated. The procedure uses Arial at 54 points, a light gray fill, and a transparency value of 0.45. A transparency of zero is opaque; increasing it makes the shape more transparent.
To make the watermark horizontal, change .Rotation = 315 to .Rotation = 0. To choose another fill, change the three values in RGB(190, 190, 190); each value represents the red, green, or blue component on a scale from 0 to 255. For example, RGB(170, 190, 220) gives a pale blue tone. You can adjust the width and height, which are expressed in points after conversion from inches, if the label needs more room.
Make changes in small steps and check the page at normal viewing size and in print preview. A watermark can be technically present but too faint to see, too dark behind body text, or partly outside the printable area. A long word may also look different from a short one at the same font size. The built-in watermark dialog is often easier if you want to insert a picture rather than create a text label with VBA.
Sections, first pages, and odd/even headers
Word documents can have multiple sections, and each section can have its own header settings. The example targets wdHeaderFooterPrimary, which is the primary header for a section. If Link to Previous is enabled, a section’s header normally inherits content from the preceding section. The macro turns that link off for each primary header so that it can manage the watermark separately. That may affect a document where section headers were intentionally linked, which is one reason to test on a copy.
A section can also use a different first-page header or separate odd- and even-page headers. In those cases, adding a shape to the primary header may not put a watermark on every page: pages using a special header may display that header instead. The code does not populate wdHeaderFooterFirstPage or wdHeaderFooterEvenPages. If those options are in use, add and test a watermark in the relevant header types as well, taking care not to create duplicates in linked headers.
To inspect these settings, open the header area and look at the Header & Footer tab for options such as Different First Page and Different Odd & Even Pages. Section breaks are found under Layout > Breaks. Those controls help explain why a watermark may appear on some pages but not others, even when the macro has completed without an error.
Remove or update the watermark
To update the label, change watermarkText in the macro and run it again. The procedure first deletes shapes named VbaTextWatermark from the primary header it processes, then creates a replacement. It is designed to replace its own named shape, not every shape that looks like a watermark. A manually inserted watermark or one created by Word’s built-in command may have a different name and remain in place.
For manual removal, try Design > Watermark > Remove Watermark. If a shape remains, open the header by double-clicking near the top of a page, select the watermark shape, and press Delete. Repeat in the affected sections or special headers if necessary. If it is hard to select, use Home > Select > Selection Pane, where floating objects can be listed and selected. Save a copy before deleting objects from a document with complex headers.
Common problems and checks
- The macro does not run: Confirm the file is a macro-enabled document if you need to store the code in it, and check that the macro is permitted by your organization’s security settings. Do not enable macros in files from unknown sources.
- The watermark is missing on some pages: Check section breaks and the Different First Page or Different Odd & Even Pages settings. The sample targets primary headers only.
- The result is too large, small, or faint: Adjust the WordArt font size, shape dimensions, fill color, and transparency, then inspect print preview. Screen appearance and printed appearance can differ.
- The header changed unexpectedly: The macro unlinks primary headers between sections. Restore or revise header links in the test copy if the original design depended on linked content.
- The shape covers the text: The code sets the shape to wrap behind text. If the document’s layout still looks wrong, select the shape in the header and review its text-wrapping and position settings.
Watermarks are visual objects, not access controls. Use Word’s file permissions or a suitable document-management process when the goal is to limit access. A watermark can identify a draft or indicate intended handling, but it cannot guarantee that a reader will preserve that label.
Frequently Asked Questions
Can I add a watermark in Word without VBA?
Yes. In Word for Microsoft 365 on Windows, use Design > Watermark and choose a preset or Custom Watermark. That is usually quickest for a single document.
Can VBA add a picture watermark?
Yes. VBA can insert and position an image shape in a header, but the example above creates text WordArt only. Use the built-in Custom Watermark option if you want a straightforward picture watermark without writing additional code.
Why does the watermark appear on only the first page?
Check whether the document uses separate section headers, a different first-page header, or odd/even headers. The sample writes to each section’s primary header, not every possible header type.
Can I use the macro in a .docx file?
You can run VBA from another permitted macro-enabled location, but a .docx file does not save VBA code inside itself. Save the macro in a .docm document or an approved template if you need it available later.
Does a watermark protect confidential information?
No. It labels the page visually but does not stop copying, editing, printing, or sharing. Use appropriate permissions and secure storage for actual access control.
Related
- Google Sheets Inventory Spreadsheet: Setup and Tips
- Inventory Spreadsheet App: How to Choose and Use One
- How to Insert a Table of Contents in Microsoft Word
Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.
More in VBA & macros
- Excel VBA: Check If AutoFilter Is Active on a SheetIn Excel VBA, check Worksheet.AutoFilterMode to find out whether AutoFilter arrows are displayed, and check Worksheet.FilterMode to find…
- VBA Range.Delete: Remove Cells, Rows, or ColumnsIn Excel VBA, use the Delete method to remove cells, rows, or columns: for example, Range("B2:C5").Delete Shift:=xlShiftUp deletes…
- Excel Macros Disabled: How to Enable Them SafelyTo enable a macro in Excel for Microsoft 365 on Windows, open a workbook you trust and select…
- Access VBA Date Conversion: Parse, Format, and ValidateIn Access VBA, use CDate to convert a value VBA already recognizes as a date, DateSerial to build…
- Excel VBA Long Strings: Limits and Practical FixesIn Excel VBA, use a variable-length String to hold long text; it can theoretically contain about 2 billion…
- Excel VBA Evaluate: How It Works and When to Use ItIn Excel VBA, Application.Evaluate interprets a text expression using Excel’s formula language and returns the result as a…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.