Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple watermarks in Word form 1

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
I have a form within Word that is designed to replace 4-part stationery. They want me to watermark each of the 4 copies of the form with the appropriate colour, e.g. "White", "Pink", "Green" and "Yellow" as I print them out. Does anyone have experience of doing this or suggest how to get it to work?
Thanks.
Des.
 
Hi Skip. I've just used the old 'Word Art behind the text' in Header/Footer. I was wondering if there was some way of having a 'Print' button that looped through some sort of code and changed the words for each copy. I've recorded the following in Word 2000:-

Sub des3()
'
' des3 Macro
' Macro recorded 11/02/2004 by desl
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes(&quot;WordArt 1&quot;).Select
Selection.ShapeRange.TextEffect.Text = &quot;Green to HR&quot;
CommandBars(&quot;WordArt&quot;).Visible = False
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

and wonder if it's just this x 4 to get the job done. I'd probably be using a template as the basis for the form.

Des.
 
Hi,

Will somnething like this work?
Code:
Sub des3()
'
' des3 Macro
' Macro recorded 11/02/2004 by desl
'
    If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
        ActiveWindow.Panes(2).Close
    End If
    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
        ActivePane.View.Type = wdOutlineView Then
        ActiveWindow.ActivePane.View.Type = wdPrintView
    End If
    
    For i = 1 To 4
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
        Select Case i
        Case 1: Selection.HeaderFooter.Shapes(&quot;WordArt 1&quot;).ShapeRange.TextEffect.Text = &quot;Green to HR&quot;
        Case 2: Selection.HeaderFooter.Shapes(&quot;WordArt 2&quot;).ShapeRange.TextEffect.Text = &quot;RED????&quot;
        Case 3: Selection.HeaderFooter.Shapes(&quot;WordArt 2&quot;).ShapeRange.TextEffect.Text = &quot;RED????&quot;
        Case 4: Selection.HeaderFooter.Shapes(&quot;WordArt 2&quot;).ShapeRange.TextEffect.Text = &quot;RED????&quot;
        End Select
        
        CommandBars(&quot;WordArt&quot;).Visible = False
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    Next
    
End Sub
:)


Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Well, what I was thinking was printing the form (Current Page as it's only 1 page) after changing the WordArt text, changing the text again and printing for a second time, ditto third and fourth changes and printing. It just seemed a bit cumbersome to put all that code behind a 'Print' Command Button on the form - but I guess it would work. It's 17:45 now, so I'll give it a go in the morning and let you know.

Thanks.
Des.
 
Believe it or not, there is alot of &quot;cumbersome code&quot; behind MOST of what you do on the computer ;-)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Ain't that so! It's just that I'm used to seeing all sorts of smart stuff that you guys come up with :). Well this is how the whole thing looks as recorded

Sub des4()
'
' des4 Macro
' Macro recorded 11/02/2004 by desl
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes(&quot;WordArt 1&quot;).Select
Selection.ShapeRange.TextEffect.Text = &quot;White to HR&quot;
Application.PrintOut FileName:=&quot;&quot;, Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=&quot;&quot;, PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
Selection.ShapeRange.TextEffect.Text = &quot;Green to HR&quot;
Application.PrintOut FileName:=&quot;&quot;, Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=&quot;&quot;, PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
Selection.ShapeRange.TextEffect.Text = &quot;Pink to HR&quot;
Application.PrintOut FileName:=&quot;&quot;, Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=&quot;&quot;, PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
Selection.ShapeRange.TextEffect.Text = &quot;Yellow Keep&quot;
Application.PrintOut FileName:=&quot;&quot;, Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=&quot;&quot;, PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

The only problem I've had is the margins are outside the settings for the printer - but I know there's something like &quot;On error resume&quot; as I saw something like that today. So I'll just have a look and a fiddle and I'm sure it'll be &quot;as right as ninepence&quot;.

Thanks for your support.
Des.
 
Code:
Sub des3()
'
' des3 Macro
' Macro recorded 11/02/2004 by desl
'
    If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
        ActiveWindow.Panes(2).Close
    End If
    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
        ActivePane.View.Type = wdOutlineView Then
        ActiveWindow.ActivePane.View.Type = wdPrintView
    End If
    
    For i = 1 To 4
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
        Select Case i
        Case 1: Selection.HeaderFooter.Shapes(&quot;WordArt 1&quot;).ShapeRange.TextEffect.Text = &quot;Green to HR&quot;
        Case 2: Selection.HeaderFooter.Shapes(&quot;WordArt 2&quot;).ShapeRange.TextEffect.Text = &quot;RED????&quot;
        Case 3: Selection.HeaderFooter.Shapes(&quot;WordArt 2&quot;).ShapeRange.TextEffect.Text = &quot;RED????&quot;
        Case 4: Selection.HeaderFooter.Shapes(&quot;WordArt 2&quot;).ShapeRange.TextEffect.Text = &quot;RED????&quot;
        End Select
        
        CommandBars(&quot;WordArt&quot;).Visible = False
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
        ActiveDocument.PrintOut
    Next
    
End Sub


Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Of course, thanks. I just had to change the lines in the loop to
Case 1: Selection.HeaderFooter.Shapes(&quot;WordArt 1&quot;).Select
Selection.ShapeRange.TextEffect.Text = &quot;White to HR&quot;

etc.
It works like a charm. I have to admit defeat on trying to find the code that will suppress the printing error message of &quot;The margins of section 1 are set outside the printable area .etc.&quot; 'Application.DisplayAlerts = False' doesn't hit the spot. Any ideas?
 
Found it!! Background:=False seems to be the answer, e.g.

ActiveDocument.PrintOut , Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=&quot;&quot;, PageType:=wdPrintAllPages, _
Collate:=True, Background:=False, PrintToFile:=False
 
I'm getting the same error msg, and 2 days later have come up with squat.

I'm using a userform as front end, ms access as backend, and sending records to a document to be printed. I have tried Background:=True and Background:=False. The only difference that I have found between the two is that one requires the user to unload the userform then respond to the error msg before printing. The other allows the user to respond to the error msg without having to unload the userform.

I copied the code that I'm using for other docs (they also have margin errors but do not display the msg), but for some reason, this one doc is not cooperating. I have found nothing that will kill the margin error msg.

Is there something that I'm missing ???

Thank you for any suggestions.

DarkMain

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top