Method 1: Using a custom VBScript
Microsoft Office has automation or scripting support. Using a VBScript, you can bulk convert Word documents to PDF. Here is a simple script I wrote to do the job:
'Convert .doc or .docx to .pdf files via Send To menu Set fso = CreateObject("Scripting.FileSystemObject") For i= 0 To WScript.Arguments.Count -1 docPath = WScript.Arguments(i) docPath = fso.GetAbsolutePathName(docPath) If LCase(Right(docPath, 4)) = ".doc" Or LCase(Right(docPath, 5)) = ".docx" Then Set objWord = CreateObject("Word.Application") pdfPath = fso.GetParentFolderName(docPath) & "\" & _ fso.GetBaseName(docpath) & ".pdf" objWord.Visible = False Set objDoc = objWord.documents.open(docPath) objDoc.saveas pdfPath, 17 objDoc.Close objWord.Quit End If Next
Convert Word documents to PDF using VBScript
- Copy the above VBScript code to Notepad.
- Save the file with a .vbs extension, and in a permanent folder. — e.g.,
d:\scripts\doc2pdf.vbs
- Close Notepad.
- Open File Explorer and browse the following SendTo folder:C:\Users\%username%\AppData\Roaming\Microsoft\Windows\SendTo
- Create a shortcut to the script
doc2pdf.vbs
in the SendTo folder. - Prefix the shortcut target with
wscript.exe
and then followed by a space. - Optionally, assign a nice-looking icon by clicking on the Change Icon button.
- Name the shortcut accordingly — e.g., Convert Word Docs to PDF
- Now, open the folder that contains the Word documents that you want to convert to PDF.
- Select the documents, right-click on the selection, and click Send to.
- Click Convert Word Docs to PDF in the Send to menu.
That’s it! Your PDF files are now ready!
Method 2: Using File Converter (Freeware)
File Converter is a simple tool which allows you to convert or compress one or several files using the context menu in Explorer. This program is Freeware!
After you install the software, all you need to do is select the .doc or .docx files you want to convert, click File Converter in the right-click menu and select To Pdf
It shows you the conversion status with the progress bar.
Reference: https://www.winhelponline.com/blog/how-to-batch-convert-word-documents-into-pdf-files/