Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Macro help - how to print a watermark on all pages!
I am having so much trouble trying to create a macro to print a
watermark on all pages. If the document is only one page it's fine but one of our documents is 4 pages. When I print this using the macro it prints "copy" on the first page, removes the header and footer for the second page and stamps "copy" on that, and then leaves the header and footers alone on pages 3 and 4 but does not stamp copy on those last 2 pages! I just cannot work it out. Please help! Here is my macro code: Sub PrintCopy() ' ' PrintCopy Macro ' Macro recorded 20/07/2006 by AFawcett ' With Selection.PageSetup .LineNumbering.Active = False .Orientation = wdOrientPortrait .TopMargin = CentimetersToPoints(0.68) .BottomMargin = CentimetersToPoints(2.5) .LeftMargin = CentimetersToPoints(3.1) .RightMargin = CentimetersToPoints(3.1) .Gutter = CentimetersToPoints(0) .HeaderDistance = CentimetersToPoints(0.5) .FooterDistance = CentimetersToPoints(1.25) .PageWidth = CentimetersToPoints(21.59) .PageHeight = CentimetersToPoints(27.94) .FirstPageTray = wdPrinterUpperBin .OtherPagesTray = wdPrinterUpperBin .SectionStart = wdSectionNewPage .OddAndEvenPagesHeaderFooter = False .DifferentFirstPageHeaderFooter = True .VerticalAlignment = wdAlignVerticalTop .SuppressEndnotes = False .MirrorMargins = False .TwoPagesOnOne = False .BookFoldPrinting = False .BookFoldRevPrinting = False .BookFoldPrintingSheets = 1 .GutterPos = wdGutterPosLeft End With ActiveDocument.Sections(1).Range.Select ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.HeaderFooter.Shapes.AddTextEffect(PowerP lusWaterMarkObject1, _ "DRAFT", "Times New Roman", 1, False, False, 0, 0).Select Selection.ShapeRange.Name = "PowerPlusWaterMarkObject1" Selection.ShapeRange.TextEffect.NormalizedHeight = False Selection.ShapeRange.Line.Visible = False Selection.ShapeRange.Fill.Visible = True Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Fill.ForeColor.RGB = RGB(192, 192, 192) Selection.ShapeRange.Fill.Transparency = 0 Selection.ShapeRange.Rotation = 315 Selection.ShapeRange.LockAspectRatio = True Selection.ShapeRange.Height = CentimetersToPoints(6.2) Selection.ShapeRange.Width = CentimetersToPoints(15.5) Selection.ShapeRange.WrapFormat.AllowOverlap = True Selection.ShapeRange.WrapFormat.Side = wdWrapNone Selection.ShapeRange.WrapFormat.Type = 3 Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeVerticalPositionMargin Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionMargin Selection.ShapeRange.Left = wdShapeCenter Selection.ShapeRange.Top = wdShapeCenter ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _ ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _ False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0 ActiveDocument.Sections(1).Range.Select ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.HeaderFooter.Shapes("PowerPlusWaterMarkO bject1").Select Selection.Delete ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument End Sub |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Word 2003 can't print anything with 2 pages or more? | Microsoft Word Help | |||
How to print odd pages in a mail merge | Microsoft Word Help | |||
Help needed w/booklet-printing macro, round 2 | Page Layout | |||
DRAFT watermark printing DAT on even pages, RF on odd pages? | Page Layout | |||
Word 2003 Mail Merge will not print individual pages or Ranges | Mailmerge |