Environment: OFFICE WORD 2007
Open Word, view macro, view, macro, menu, create
http://blog.csdn.net/aminfo/article/details/38760093
SUB Macro 1 () Dim MyFile As String Dim Arr (+) As string to process the maximum number of files at once, modify the number 1000 as needed to change the number to be processed dim count as Integer M Yfile = Dir ("f:\ HTML directory \" & "*.html") Count = Count + 1 Arr (count) = MyFile Do While MyFile <> "" MyFile = Dir If MyFile = "" Then Exit do End If count = count + 1 Arr (count) = MyFile ' The name of the file exists in the array loop for i = 1 to Count Documents.Open filename:= "f:\ pending HTML directory \" & ARR (i), Confirmconversions:=false, readonly:= _ False, Addtorecentfiles:=false, passworddocument:= "", PasswordTemplate:= _ "", Revert:=false, writepassworddocument:= "", writepasswordtemplate:= "", _ Format:=wdopenformatauto, XMLTran Sform:= "" Activedocument.saveas filename:= "f:\ after processing doc saved directory \" & Replace (ARR (i), ". html", ". Doc"), FILEFORMAT:=WDF Ormatdocument, _ Lockcomments:=false, password:= "", Addtorecentfiles:=true, WritePassword _: = "", ReadOnlyRe Commended:=false, EmbedtRuetypefonts:=false, _ Savenativepictureformat:=false, Saveformsdata:=false, saveasaoceletter:= _ False Activedocument.close NextEnd Sub
http://blog.csdn.net/aminfo/article/details/38760093
Then save the run.
Use Word macros to convert HTML to doc in bulk