This code loops through the range's shapes. If (InStr(shape_range.Name, "PowerPlusWaterMarkObject") > 0) Then Sub RemoveWatermarksFromRange(rng As Range) ' string PowerPlusWaterMarkObject from this range. ' Remove shapes that have a name containing the This subroutine loops through the document's sections and calls the following RemoveWatermarksFromRange subroutine for each of the three kinds of headers for each section. RemoveWatermarksFromRange sec.Headers(wdHeaderFooterEvenPages).Range RemoveWatermarksFromRange sec.Headers(wdHeaderFooterPrimary).Range RemoveWatermarksFromRange sec.Headers(wdHeaderFooterFirstPage).Range ' Remove watermarks from the active document. The following code removes watermarks from the active Word document. If the document is long, this can take a while, so the code finishes by displaying a message box to let you know that it is done. It creates a Range representing the end of the header and adds the desired building block to it. For each section, it loops through the section's headers. It then loops through the document's sections. This code declares some variables and then defines strings to identify the six standard watermark types. "Blocks\1033\14\Built-In Building Blocks.dotx"īuildingBlockEntries(confidential_1).Insert _ "\AppData\Roaming\Microsoft\Document Building "
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |