Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _ĬreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _īitmapMissingFonts:=True, UseISO19005_1:=FalseĤ. WdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _ WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _ĪctiveDocument.ExportAsFixedFormat OutputFileName:=xFolder & xNewName, _ĮxportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _ PasswordDocument:="", PasswordTemplate:="", Revert:=False, _ XNewName = Replace(xFileName, Mid(xFileName, xIndex), "pdf")ĭocuments.Open FileName:=xFolder & xFileName, _ĬonfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _ If ((Right(xFileName, 4)) ".doc" Or Right(xFileName, 4) ".docx") Then XFileName = Dir(xFolder & "*.*", vbNormal) Set xDlg = Application.FileDialog(msoFileDialogFolderPicker) VBA code: Batch convert multiple Word documents to pdf files in Word Sub ConvertWordsToPdfs() In the Microsoft Visual Basic for Applications window, click Insert > Module, then copy below VBA code into the Module window. In Word, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.Ģ. The following VBA code helps you quickly convert all Word documents in a folder to pdf files at once. But if you want to convert all Word documents in a folder to separate PDF files at once, how can you achieve it? This article will show you a VBA code to batch convert multiple Word documents to pdf files in Word.īatch convert multiple Word documents to pdf files with VBAīatch convert multiple Word documents to pdf files with Kutools for Word It is easy for you to convert a Word document to a PDF file with the Save as function in Word. How to batch convert multiple Word documents to pdf files?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |