Want to add a signature to batch at the end of the word finally: Name, Designation, Signature& Stamp
CodePudding user response:
Write good, VBS script code is as follows:
Const wdcharacter=1 Const wdmove=0 The Set of word=createobject (" word. Application ") Word. The visible=True The Set of fso=createobject (" scripting. Filesystemobject ") Curdir=fso. Getparentfoldername (wscript. Scriptfullname) The Set objfolder=fso. Getfolder (curdir) For Each objfile In objfolder. Files The Select Case LCase (fso) getextensionname (objfile. Name)) Case "doc", "docx", "docm "The Set of doc=word. The documents. The open (objfile. Path) Doc. Content. Select Word. Selection. Moveright wdcharacter, 1, wdmove Word. The selection. The Text=VBCRLF & amp; "The Name, Designation, Signature& Stamp " Doc. Save Doc. Close End the Select Next Word. Quit
Msgbox "done!"
Run the example:
Download address: Link: https://pan.baidu.com/s/1GY-Cv2hGB_ru8DhGVtUoNQ The extracted code: wt70