Use Word macros to convert HTML to doc in bulk

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.