# coding:utf8 import win32com from win32com.client import Dispatch, constants
def getWordAddWatermark(): wordApp = win32com.client.DispatchEx(
"Word.Application") # open word process wordApp.Visible = True wordApp.DisplayAlerts =
False doc = wordApp.Documents.Add() # Create a new blank file actDoc = wordApp.ActiveDocument
Sect= actDoc.Sections(1).Range.Select() wordApp.ActiveWindow.ActivePane.View.
SeekView= 9 # selectObj = wordApp.Selection wordApp.Selection.HeaderFooter.
Shapes.AddTextEffect(0, "DOt1x © QQ980469001", " Isoline ", 1, False, False, 0, 0).
Select() # shpObj = vart.Select() wordApp.Selection.ShapeRange.Name = '0'
wordApp.Selection.ShapeRange.TextEffect.NormalizedHeight = False wordApp.
Selection.ShapeRange.Line.Visible = False wordApp.Selection.ShapeRange.Fill.
Visible= True wordApp.Selection.ShapeRange.Fill.Solid wordApp.Selection.
ShapeRange.Fill.ForeColor = 0 wordApp.Selection.ShapeRange.Fill.Transparency =
0.5 # Set color wordApp.Selection.ShapeRange.Fill.ForeColor.ObjectThemeColor = 14
wordApp.Selection.ShapeRange.Fill.ForeColor.TintAndShade = 0 wordApp.Selection.
ShapeRange.Rotation = 315 wordApp.Selection.ShapeRange.LockAspectRatio = True
wordApp.Selection.ShapeRange.Height = 120 wordApp.Selection.ShapeRange.Width =
460 wordApp.Selection.ShapeRange.WrapFormat.AllowOverlap = True #
wordApp.Selection.ShapeRange.WrapFormat.Side = wdWrapNone wordApp.Selection.
ShapeRange.WrapFormat.Type = 3 wordApp.Selection.ShapeRange.WrapFormat.Side = 3
wordApp.Selection.ShapeRange.RelativeVerticalPosition = 0 wordApp.Selection.
ShapeRange.Left = -999995 wordApp.Selection.ShapeRange.Top = -999995 #
There's a problem here , No hint select This method # wordApp.Selection.HeaderFooter.Shapes("0").Select #
wordApp.Selection.ShapeRange.Duplicate.select #
wordApp.Selection.ShapeRange.IncrementLeft(-426.8) #
wordApp.Selection.ShapeRange.IncrementTop(403.85) # Close header and footers wordApp.ActiveWindow.
ActivePane.View.SeekView = 0 actDoc.Save() actDoc.Close() wordApp.Close() if
__name__== '__main__': getWordAddWatermark()

Technology
©2019-2020 Toolsou All rights reserved,
Faster RCNN Explanation of series algorithm principle ( note ) Huawei certification HCIA-AI artificial intelligence Free download of documents : To introduce you to a few useful free download URL CSS architecture design MySQL An interview is a must !TP6 Application examples of verifier and correct verification data China Lunar Rover “ Moon rabbit No.2 ” A strange rock was found on the moon Programmer Tanabata Valentine's Day confession code A single key controls multiple water lamp states Jsp+Ajax+Servlet+Mysql Add, delete, modify and query ( one )