N
Neil Humphries
I need to delete any existing watermark, standard or custom before inserting
a new watermark. When I recorded a macro, I got the following:
Sub DelWatermark()
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes("PowerPlusWaterMarkObject25706312").Select
Selection.Delete
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
WordBasic.RemoveWatermark
End Sub
The identifier "PowerPlusWaterMarkObject25706312" is unique to the
particular watermark that I deleted. How do I delete any watermark?
I found these building block type constants, but don't know how to make use
of them.
wdTypeCustomWatermarks
wdTypeWatermarks
Most of the documents only have 1 section, but I can't guarantee that. Would
the following code loop through all the sections for me?
Dim I As Integer
Dim Isectioncount As Integer
Set Isectioncount = ActiveDocument.Sections.Count
For I = 0 To Isectioncount
' Code to remove watermark
Next I
a new watermark. When I recorded a macro, I got the following:
Sub DelWatermark()
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes("PowerPlusWaterMarkObject25706312").Select
Selection.Delete
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
WordBasic.RemoveWatermark
End Sub
The identifier "PowerPlusWaterMarkObject25706312" is unique to the
particular watermark that I deleted. How do I delete any watermark?
I found these building block type constants, but don't know how to make use
of them.
wdTypeCustomWatermarks
wdTypeWatermarks
Most of the documents only have 1 section, but I can't guarantee that. Would
the following code loop through all the sections for me?
Dim I As Integer
Dim Isectioncount As Integer
Set Isectioncount = ActiveDocument.Sections.Count
For I = 0 To Isectioncount
' Code to remove watermark
Next I