Set xFSO = CreateObject("Scripting.FileSystemObject")įor Each xSubFolder In xFolder. XNewName = VBA.Left$(xFileName, VBA.InStrRev(xFileName, "doc") - 1) & "docx"ĭocuments.Open FileName:=FldPath & xFileName, _ĪctiveDocument.SaveAs FldPath & xNewName, wdFormatDocumentDefault XFileName = Dir(FldPath & "*.doc", vbNormal) See the following screenshot:Īfter that, press the F5 key to run the code. To include subfolders, please try the following VBA code.Īfter adding the code, go to the Tools tab, click References, in the opening References - Project dialog box, check the Microsoft Scripting Runtime box, and then click the OK button to save the changes. In the Document Format Converter dialog box, you need to do as follows: doc format documents in a specified folder, then click Kutools Plus > Doc/Docx. Kutools for Word : With more than 100 handy Word add-ins, free to try with no limitation in 60 days.ġ. With the Doc/Docx utility of Kutools for Word, you can easily convert all. docx documents immediately as below screenshot shown.Ī handy utility will be recommended in this section. In the opening Browse window, select the folder contains the. WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _ĪctiveDocument.SaveAs xFolder & Replace(xFileName, "doc", "docx"), wdFormatDocumentDefaultĤ. PasswordDocument:="", PasswordTemplate:="", Revert:=False, _ XFileName = Dir(xFolder & "*.doc", vbNormal)ĭocuments.Open FileName:=xFolder & xFileName, _ĬonfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _ Features of Batch DOC and DOCX Converter Convert Word DOC (Word 2003) to DOCX (Word 2007 OOXML Format) and DOCX to DOC easily Convert DOCX 2007 to/from 2010. Set xDlg = Application.FileDialog(msoFileDialogFolderPicker) docx in a certain folder Sub ConvertDocToDocx() Then copy below VBA code into the Module window. Press the Alt + F11 key to open the Microsoft Visual Basic for Applications window.ģ. doc format documents you will convert to. doc format documents in a specified folder to. This section is going to show you the VBA code to convert all. docx format at once? This article will show you two methods to solve this problem.īatch convert. Supposing you have received some 97-2003 format Word documents, how can you batch convert all these.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |