Private Sub Command1_Click() Dim MyWord As Word.Application, WordDoc As Word.Document Set MyWord = New Word.Application Set WordDoc = MyWord.Documents.Add AddWaterMark WordDoc MyWord.Visible = True End Sub Private Sub AddWaterMark(pDoc As Word.Document) pDoc.Shapes.AddTextEffect 0, "ULTRA SECRET", "Century Gothic", 1, False, False, 0, 0 pDoc.Shapes(1).Name = "PowerPlusWaterMarkObject1" pDoc.Shapes(1).TextEffect.NormalizedHeight = False pDoc.Shapes(1).Line.Visible = False pDoc.Shapes(1).Fill.Visible = True pDoc.Shapes(1).Fill.Solid pDoc.Shapes(1).Fill.ForeColor.RGB = RGB(0, 255, 255) pDoc.Shapes(1).Fill.Transparency = 0.8 pDoc.Shapes(1).Rotation = 315 pDoc.Shapes(1).LockAspectRatio = True pDoc.Shapes(1).Height = 80 pDoc.Shapes(1).Width = 520 pDoc.Shapes(1).WrapFormat.AllowOverlap = True pDoc.Shapes(1).WrapFormat.Side = wdWrapNone pDoc.Shapes(1).WrapFormat.Type = 3 pDoc.Shapes(1).RelativeHorizontalPosition = wdRelativeVerticalPositionMargin pDoc.Shapes(1).RelativeVerticalPosition = wdRelativeVerticalPositionMargin pDoc.Shapes(1).Left = wdShapeCenter pDoc.Shapes(1).Top = wdShapeCenter End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)