• Watermarks on all pages (VBA/Word XP SP1)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Watermarks on all pages (VBA/Word XP SP1)

    Author
    Topic
    #1771566

    I’ve combed through past postings on watermarks and have a question that I don’t think has been addressed yet.

    Has anybody come up with code to insert a watermark on all pages of a document?

    I created a 4-page document with a section break at the end of page 2. I also have headers and footers set to Different first page set in Page Setup. When I insert a watermark using Word’s built-in dialog, I get a watermark on every page.

    If I capture the same steps in a macro and play them back, the watermark appears on pages 1, and 3 only. Also, the text in the first section is left selected (the code does select text but doesn’t collapse it).

    So apparently what Word does internally is different than what you can do in code — has anyone found a way around this?

    Thanks,
    Kim

    Viewing 1 reply thread
    Author
    Replies
    • #1815258

      This has been covered in the past – you just have to look further back.

      This thread covers the topic to death and includes a link back to an earlier thread where my own macro solution was posted.

      The macro solution to this problem has seemed to have died away since Word XP can do the watermarks from the menu. Certainly I never would have attempted to solve the issues involved if I was using Word XP at the time.

      • #1815335

        Thanks Andrew and Howard,

        Yep, I didn’t go back far enough. I was focused on XP or higher since the method of adding a watermark seemed to be different from previous versions. I will see if I can modify my macro with the elements of the 2000 macro that address the headers.

        I have had previous experience with the issues in Howard’s article on macro recording, so I wasn’t as flabbergasted as I could have been…

        BTW, the reason I wanted to do this programmatically was to provide an easier way to choose text other than that on the list. The text in the example Andrew pointed to is a good example.

        Thank you both for pointing me in the right direction. cheers

        Kim

        • #1815366

          I do most things using macros, as even if it’s a 1-shot, this ole pack rat saves the code for a rainy day.

          If I can manage to find the code, when that rainy day comes, ends up saving me time.

          • #1815372

            I know what you mean! I’ve started putting code snips in an Access db (just cut and paste into a memo field) with notations on what it’s for and where it came from/who provided it.

            It’s saved me a lot of wheel reinventing time.

            BTW, the code to access the header and the shapes layer was exactly what I needed. I cobbled that together with the code to insert a “PowerPlusWatermarkObject1” text effect and it works just fine.

            Thanks again,
            Kim

    • #1815262
    Viewing 1 reply thread
    Reply To: Watermarks on all pages (VBA/Word XP SP1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: