![](images/userface/image6.gif)
加好友 发短信
等级:三尾狐
帖子:632
积分:5651
威望:0
精华:0
注册:2012/8/2 19:04:00
|
word满屏水印 Post By:2022/3/17 17:11:00 [只看该作者]
请问下老师,下面这个可以修改成满屏水印吗?
Dim app As New MSWord.Applicationtry Dim fileName = "d:\test.doc" Dim doc = app.Documents.Open(fileName) app.ActiveWindow.Selection.Range.Select() doc.Application.ActiveWindow.ActivePane.View.SeekView = MSWord.WdSeekView.wdSeekCurrentPageHeader app.Selection.HeaderFooter.Shapes.AddTextEffect(1, "公司绝密", "宋体", 1, False, False, 0, 0).Select app.Selection.ShapeRange.Name = "PowerPlusWaterMarkObject1" app.Selection.ShapeRange.TextEffect.NormalizedHeight = False app.Selection.ShapeRange.Line.Visible = False app.Selection.ShapeRange.Fill.Visible = True app.Selection.ShapeRange.Fill.Solid app.Selection.ShapeRange.Fill.ForeColor.RGB = RGB(192, 192, 192) app.Selection.ShapeRange.Fill.Transparency = 0.5 app.Selection.ShapeRange.Rotation = 315 app.Selection.ShapeRange.LockAspectRatio = True app.Selection.ShapeRange.Height = app.CentimetersToPoints(4.13) app.Selection.ShapeRange.Width = app.CentimetersToPoints(16.52) app.Selection.ShapeRange.WrapFormat.AllowOverlap = True app.Selection.ShapeRange.WrapFormat.Side = MSWord.WdWrapSideType.wdWrapBoth app.Selection.ShapeRange.WrapFormat.Type = 3 app.Selection.ShapeRange.RelativeHorizontalPosition = MSWord.WdRelativeVerticalPosition.wdRelativeVerticalPositionMargin app.Selection.ShapeRange.RelativeVerticalPosition = MSWord.WdRelativeVerticalPosition.wdRelativeVerticalPositionMargin app.Selection.ShapeRange.Left = -999995 app.Selection.ShapeRange.Top = -999995 app.ActiveWindow.ActivePane.View.SeekView = MSWord.WdSeekView.wdSeekMainDocument doc.save app.Visible = True 'app.quitcatch ex As exception msgbox(ex.message) app.quitfinally 'app.QuitEnd try
|
|