Skip to main content

AccessTr.neT


Word Belgesini Form Üzerinden Pdf'ye Dönüştürme

Word Belgesini Form Üzerinden Pdf'ye Dönüştürme

#2
Kod:
Private Sub CreatePDF(strSourceFile As String, strDestFile As String)
Dim objWord As Word.Application
Dim objWordDoc As Word.Document

On Error GoTo ErrorHandler

Set objWord = CreateObject(“Word.Application”)
objWord.Visible = True
Set objWordDoc = objWord.Documents.Open(strSourceFile)
If Not objWord Is Nothing Then
objWordDoc.ExportAsFixedFormat strDestFile, wdExportFormatPDF, False, wdExportOptimizeForPrint, wdExportAllDocument
End If

ExitProcedure:
objWordDoc.Close False
objWord.Quit
Set objWordDoc = Nothing
Set objWord = Nothing
Exit Sub

ErrorHandler:
MsgBox Err.Description, vbInformation, “!!!HATA!!!! PDF Oluşturulamadı!”

End Sub

kodunu deneyin.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
RE: Word Belgesini Form Üzerinden Pdf'ye Dönüştürme - Yazar: atoykan - 13/07/2023, 12:48
Task