Word uygulamasını açınız. Geliştirici sekmesine tıklayınız.
Geliştirici (Developer) sekmesi yoksa Dosya → Seçenekler → Şeridi Özelleştir → Geliştirici’yi işaretleyiniz.
Visual Basic’te Insert → Module .
Sub BatchConvertWordToPDF()
Dim folderPath As String
Dim fileName As String
Dim doc As Document
folderPath = “C:\Users\Kullanici\Desktop\WordDosyalar\” ‘sonunda \ olacak
fileName = Dir(folderPath & “*.doc*”)
Application.ScreenUpdating = False
Do While fileName <> “”
Set doc = Documents.Open(folderPath & fileName, ReadOnly:=True)
doc.ExportAsFixedFormat _
OutputFileName:=folderPath & Left(fileName, InStrRev(fileName, “.”) – 1) & “.pdf”, _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument
doc.Close SaveChanges:=False
fileName = Dir
Loop
Application.ScreenUpdating = True
MsgBox “Bitti: Klasörde PDF’ler oluşturuldu.”
End Sub
Bu makrodaki yolu word dosyalarınızın olduğu klasör yolu ile değiştiriniz.
>>>> Run >>>>>
