- 'click
- If Wscript.Arguments.Count=0 Then
- Msgbox "Drag and drop files on."
- Wscript.Quit
- End If
- 'start
- set wshell = CreateObject("Wscript.Shell")
- For i=0 to Wscript.Arguments.Count-1
- singlePath=singlePath+Wscript.Arguments(i)+"|"
- next
- 'msgbox singlePath
- singlePaths = split(singlePath,"|")
- encodenum = inputbox("Please enter Encoding Code:")
- if not isnumeric(encodenum) then
- msgbox "error!"
- Wscript.Quit
- end if
- filetype = inputbox("Please enter target file type:")
- if trim(filetype)="" then
- msgbox "error!"
- Wscript.Quit
- end if
- Set myDocs = CreateObject("Word.Application")
- Set myDoc = myDocs.Documents
- for each singlePath in singlePaths
- if singlePath = "" then
- exit for
- end if
- 'start winword
- myDocs.Visible = true
- set myDoc1 = myDoc.Open(singlePath)
- myDocs.Application.Run "tw4winClean"
- fname = left(myDocs.ActiveDocument.FullName,len(myDocs.ActiveDocument.FullName)-3)& filetype
- 'msgbox fname
- myDocs.Application.ActiveDocument.SaveAs fname,2,False,"", True,"",False,False, _
- False, False, False,encodenum,False,False,wdCRLF
- myDocs.ActiveDocument.close
- next