Hi,I am attempting to insert a “concept” watermark into a MS Word document that is created via Lotusscript.
I have added a code snippet below that should add the watermark. The code is created by the VBA macro recorder.
Before this piece of code is executed, lotusscript successfully creates the word document and merges fields from Notes documents.
The code stops at the 2nd line with the message: Instance member ACTIVEPANE does not exist.
The wd are declared as constants.
Any suggestions/solutions?
The idea is also to be able to remove the watermark when the Word document is approved.
'========================= INSERT WATERMARK
wordDoc.Sections(1).Range.Select
wordApp.ActivePane.View.SeekView = wdSeekCurrentPageHeader
selection.HeaderFooter.Shapes("PowerPlusWaterMarkObject1").Select
selection.ShapeRange.TextEffect.Text = "CONCEPT"
selection.ShapeRange.TextEffect.FontSize = 1
selection.ShapeRange.TextEffect.FontName = "FrnkGothITC Bk BT"
selection.ShapeRange.Line.Visible = False
selection.ShapeRange.Fill.Visible = True
selection.ShapeRange.Fill.Solid
selection.ShapeRange.Fill.ForeColor.RGB = 12632256
selection.ShapeRange.Fill.Transparency = 0.5
selection.ShapeRange.Rotation = 315
selection.ShapeRange.LockAspectRatio = True
selection.ShapeRange.Height = CentimetersToPoints(5.01)
selection.ShapeRange.Width = CentimetersToPoints(17.54)
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
wordApp.ActivePane.View.SeekView = wdSeekMainDocument