--
You received this message because you are subscribed to the Google Groups "BitCurator Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcurator-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcurator-users/d69cdd00-8022-4b30-bf9a-63b17f24ca7cn%40googlegroups.com.
Sub BatchConvertToPDF_A()
Dim file As String
Dim folderPath As String
folderPath = "C:\Your\Folder\Path\Here\"
file = Dir(folderPath & "*.docx")
Do While file <> ""
Dim doc As Document
Set doc = Documents.Open(folderPath & file)
' Optional: Refresh layout
doc.Repaginate
' Export as PDF/A
doc.ExportAsFixedFormat _
OutputFileName:=folderPath & Replace(file, ".docx", ".pdf"), _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateHeadingBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=True ' Enables PDF/A-1b format
doc.Close False
file = Dir
Loop
End Sub
Hit F5 to run. It should work. It will create a second version and not delete your word documents.