Put watermark on document using vba

AOsment742

New member
Local time
Today, 09:07
Joined
May 22, 2012
Messages
2
I am trying to open a Microsoft Word document and add a watermark using VBA in Access 2007. The document opens and prints the watermark on all pages but the first page. While debugging the module that does this we have found that once word is opened it refers to the first page as the FirstHeaderPage whereas all other pages are just HeaderFooter. Any help is appreciated.
 
You would probably get a better answer in a Word forum. Have you tried assigning the watermark image to both sections?

When I need to know how to automate Word (or Excel or Powerpoint, etc), I open the application and turn on the macro recorder while I perform the steps. When you're done, save the macro and examine the generated code. The syntax is a little different because the objects are referenced differently from without than from within but the properties and methods are the same.
 
We did do the macro recorder within Word and copied the code into an Access module. In Word the watermark printed on every page but in Access it left out page 1. Since Word didn't give us any syntax for the FirstHeaderPage (it only referenced HeaderFooter), we are unable to figure out the exact code to force it to print. I will try a Word forum. Thank you!
 
There may be some property for the Word document that specifies whether or not the first page is treated differenty. If so,you can set this property when you create the document.
 

Users who are viewing this thread

Back
Top Bottom