|
发表于 2023-8-1 11:41:15
|
显示全部楼层
广东省梅州市
.版本 2
局_word对象.获取 (“word.Application”)
' ActiveDocument.Sections(1).Range.Select
局_ActiveDocument = 局_word对象.读对象型属性 (“ActiveDocument”, )
' 局_Sections = 局_ActiveDocument.读对象型属性 (“Sections”, )
' 局_Sections.读对象型属性 (“Item”, 1).读对象型属性 (“Range”, ).方法 (“Select”, )
' ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
局_word对象.读对象型属性 (“ActiveWindow”, ).读对象型属性 (“ActivePane”, ).读对象型属性 (“View”, ).写属性 (“SeekView”, 9) ' #wdSeekCurrentPageHeader的值=9
局_Selection = 局_word对象.读对象型属性 (“Selection”, )
局_Sections.读对象型属性 (“HeaderFooter”, ).读对象型属性 (“Shapes”, ).对象型方法 (“PowerPlusWaterMarkObject8163454”, ).方法 (“Select”, )
局_Sections.写属性 (“Delete”, )
' Selection.HeaderFooter.Shapes.AddTextEffect( _
' PowerPlusWaterMarkObject8163454, "保密1", "等线", 1, False, False, 0, 0). _Select
局_Selection.读对象型属性 (“HeaderFooter”, ).读对象型属性 (“Shapes”, ).对象型方法 (“AddTextEffect”, 0, “保密1”, “等线”, 1, 真, 假, 0, 0).方法 (“Select”, )
局_ShapeRange = 局_Selection.读对象型属性 (“ShapeRange”, )
' Selection.ShapeRange.Name = "PowerPlusWaterMarkObject8163454"
局_ShapeRange.写属性 (“Name”, “PowerPlusWaterMarkObject8163454”)
' Selection.ShapeRange.TextEffect.NormalizedHeight = False
局_ShapeRange.读对象型属性 (“TextEffect”, ).写属性 (“NormalizedHeight”, 假)
' Selection.ShapeRange.Line.Visible = False
局_ShapeRange.读对象型属性 (“Line”, ).写属性 (“Visible”, 假)
' Selection.ShapeRange.Fill.Visible = True
局_ShapeRange.读对象型属性 (“Fill”, ).写属性 (“Visible”, 真)
' Selection.ShapeRange.Fill.Solid
局_ShapeRange.读对象型属性 (“Fill”, ).方法 (“Solid”, )
' Selection.ShapeRange.Fill.ForeColor.RGB = RGB(192, 192, 192)
局_ShapeRange.读对象型属性 (“Fill”, ).读对象型属性 (“ForeColor”, ).写属性 (“RGB”, 取颜色值 (192, 192, 192))
' Selection.ShapeRange.Fill.Transparency = 0.5
局_ShapeRange.读对象型属性 (“Fill”, ).写属性 (“Transparency”, 0.5)
' Selection.ShapeRange.Rotation = 315
局_ShapeRange.写属性 (“Rotation”, 315)
' Selection.ShapeRange.LockAspectRatio = True
局_ShapeRange.写属性 (“LockAspectRatio”, 真)
' Selection.ShapeRange.Height = CentimetersToPoints(5.9)
局_ShapeRange.写属性 (“Height”, 局_word对象.数值方法 (“CentimetersToPoints”, 5.9))
' Selection.ShapeRange.Width = CentimetersToPoints(14.75)
局_ShapeRange.写属性 (“Width”, 局_word对象.数值方法 (“CentimetersToPoints”, 14.75))
' Selection.ShapeRange.WrapFormat.AllowOverlap = True
局_ShapeRange.读对象型属性 (“WrapFormat”, ).写属性 (“AllowOverlap”, 真)
' Selection.ShapeRange.WrapFormat.Side = wdWrapNone
局_ShapeRange.读对象型属性 (“WrapFormat”, ).写属性 (“Side”, 3) ' #wdWrapNone的值=3
' Selection.ShapeRange.WrapFormat.Type = 3
局_ShapeRange.读对象型属性 (“WrapFormat”, ).写属性 (“Type”, 3)
' Selection.ShapeRange.RelativeHorizontalPosition = _
' wdRelativeVerticalPositionMargin
局_ShapeRange.写属性 (“RelativeHorizontalPosition”, 0) ' wdRelativeVerticalPositionMargin的值=0
' Selection.ShapeRange.RelativeVerticalPosition = _
' wdRelativeVerticalPositionMargin
局_ShapeRange.写属性 (“RelativeVerticalPosition”, 0) ' wdRelativeVerticalPositionMargin的值=0
' Selection.ShapeRange.Left = wdShapeCenter
局_ShapeRange.写属性 (“Left”, #wdShapeCenter) ' wdShapeCenter的值=-999995
' Selection.ShapeRange.Top = wdShapeCenter
局_ShapeRange.写属性 (“Top”, #wdShapeCenter) ' wdShapeCenter的值=-999995
' ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
局_word对象.读对象型属性 (“ActiveWindow”, ).读对象型属性 (“ActivePane”, ).读对象型属性 (“View”, ).写属性 (“SeekView”, 0) ' #wdSeekMainDocument的值=0
|
|