Kayıt Tarihi: 27.11.2019
Toplam 76 konu açtı.
Toplam 308 yorum yaptı.
Toplam
19
puanı bulunmakta.
Mevcut Office Sürümü:
Office 2013,
Office 2016,
Office 2019,
Beğeniler: 18 / 4
(16-04-2021, 03:00) userx53 demiş ki: Bu işlem için ücretsiz PDF Splitter and Merger Free kullanıyorum.
Hocam access projeme entegre edeceğim o yüzden böyle bir arayışa girdim.
Kayıt Tarihi: 12.03.2008
Toplam 80 konu açtı.
Toplam 631 yorum yaptı.
Toplam
75
puanı bulunmakta.
Mevcut Office Sürümü:
Office 2016 TR,
Beğeniler: 0 / 4
Bu iş için kendi yazdığım DLL var. Onu deneyebilirsiniz... Kaynak VB kodları ve DLL'ler ektedir.
Visual Basic
Sub Test()
DoCmd . OutputTo acOutputTable, "COUNTRY", acFormatPDF, Environ( "userprofile") & "\Desktop\AccOutput_Part1. pdf"
DoCmd . OutputTo acOutputTable, "COUNTRY", acFormatPDF, Environ( "userprofile") & "\Desktop\AccOutput_Part2. pdf"
Dim arrSrc( 1) As String
arrSrc( 0) = Environ( "userprofile") & "\Desktop\AccOutput_Part1. pdf"
arrSrc( 1) = Environ( "userprofile") & "\Desktop\AccOutput_Part2. pdf"
Dim objPDFClown As New PDFClownClass
Call objPDFClown. MergePDF( arrSrc, Environ( "userprofile") & "\Desktop\AccOutput_Merge. pdf")
End Sub
Class:
Visual Basic
Option Explicit
#If Win64 Then
Private Declare PtrSafe Function FreeLibrary Lib "kernel32" ( ByVal hLibModule As LongLong) As LongLong
Private Declare PtrSafe Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( ByVal lpLibFileName As String ) As LongLong
Private Declare PtrSafe Function GetProcAddress Lib "kernel32" ( ByVal hModule As LongLong, ByVal lpProcName As String ) As LongLong
Private Declare PtrSafe Function CallWindowProc Lib "user32. dll" Alias "CallWindowProcA" ( ByVal lpPrevWndFunc As LongLong, _
ByVal hwnd As LongLong, ByVal msg As Long , ByVal wParam As LongLong, _
ByVal lParam As LongLong) As Object
Private hLibrary As LongLong
#Else
Private Declare Function FreeLibrary Lib "kernel32" ( ByVal hLibModule As Long ) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( ByVal lpLibFileName As String ) As Long
Private Declare Function GetProcAddress Lib "kernel32" ( ByVal hModule As Long , ByVal lpProcName As String ) As Long
Private Declare Function CallWindowProc Lib "user32. dll" Alias "CallWindowProcA" ( ByVal lpPrevWndFunc As Long , ByVal hwnd As Long , _
ByVal msg As Long , ByVal wParam As Long , ByVal lParam As Long ) As Object
Private hLibrary As Long
#End If
Private objPdfClass As Object
'-------------------------------
' Zeki GÜRSOY - PdfClown VBA Lib.
'-------------------------------
Public Sub MergePDF( ByRef srcFileNames() As String , ByVal destFile As String )
Call objPdfClass. MergePDF( srcFileNames, destFile)
End Sub
Private Sub Class_Initialize()
#If Win64 Then
Dim myProc As LongLong
If Dir( CurrentProject. Path & "\PdfVbaLib64. dll") = "" Then
Err. Raise 1001, , "'PdfVbaLib64.dll' bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
hLibrary = LoadLibrary( CurrentProject. Path & "\PdfVbaLib64. dll")
If hLibrary = 0 Then
Err. Raise 1002, , "'PdfVbaLib64.dll' yüklenemedi." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
myProc = GetProcAddress( hLibrary, "NewPDFClass")
If myProc = 0 Then
Call Class_Terminate
Err. Raise 1003, , "'NewPDFClass' entry point bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
#Else
Dim myProc As Long
If Dir( CurrentProject. Path & "\PdfVbaLib. dll") = "" Then
Err. Raise 1001, , "'PdfVbaLib.dll' bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
hLibrary = LoadLibrary( destDir & "\PdfVbaLib. dll")
If hLibrary = 0 Then
Err. Raise 1002, , "'PDFVBALib.dll' yüklenemedi." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
myProc = GetProcAddress( myLib, "NewPDFClass")
If myProc = 0 Then
Call Class_Terminate
Err. Raise 1003, , "'NewPDFClass' entry point bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
#End If
Set objPdfClass = CallWindowProc( myProc, 0, 0, 0, 0)
End Sub
Private Sub Class_Terminate()
If hLibrary <> 0 Then Call FreeLibrary( hLibrary)
hLibrary = 0
End Sub
Eklenti Dosyaları
Pdf_Merge_Example.rar (Boyut: 564,88 KB / İndirilme: 44)
Kayıt Tarihi: 27.11.2019
Toplam 76 konu açtı.
Toplam 308 yorum yaptı.
Toplam
19
puanı bulunmakta.
Mevcut Office Sürümü:
Office 2013,
Office 2016,
Office 2019,
Beğeniler: 18 / 4
(16-04-2021, 19:39) Zeki Gürsoy demiş ki: Bu iş için kendi yazdığım DLL var. Onu deneyebilirsiniz... Kaynak VB kodları ve DLL'ler ektedir.
Visual Basic
Sub Test()
DoCmd . OutputTo acOutputTable, "COUNTRY", acFormatPDF, Environ( "userprofile") & "\Desktop\AccOutput_Part1. pdf"
DoCmd . OutputTo acOutputTable, "COUNTRY", acFormatPDF, Environ( "userprofile") & "\Desktop\AccOutput_Part2. pdf"
Dim arrSrc( 1) As String
arrSrc( 0) = Environ( "userprofile") & "\Desktop\AccOutput_Part1. pdf"
arrSrc( 1) = Environ( "userprofile") & "\Desktop\AccOutput_Part2. pdf"
Dim objPDFClown As New PDFClownClass
Call objPDFClown. MergePDF( arrSrc, Environ( "userprofile") & "\Desktop\AccOutput_Merge. pdf")
End Sub
Class:
Visual Basic
Option Explicit
#If Win64 Then
Private Declare PtrSafe Function FreeLibrary Lib "kernel32" ( ByVal hLibModule As LongLong) As LongLong
Private Declare PtrSafe Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( ByVal lpLibFileName As String ) As LongLong
Private Declare PtrSafe Function GetProcAddress Lib "kernel32" ( ByVal hModule As LongLong, ByVal lpProcName As String ) As LongLong
Private Declare PtrSafe Function CallWindowProc Lib "user32. dll" Alias "CallWindowProcA" ( ByVal lpPrevWndFunc As LongLong, _
ByVal hwnd As LongLong, ByVal msg As Long , ByVal wParam As LongLong, _
ByVal lParam As LongLong) As Object
Private hLibrary As LongLong
#Else
Private Declare Function FreeLibrary Lib "kernel32" ( ByVal hLibModule As Long ) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( ByVal lpLibFileName As String ) As Long
Private Declare Function GetProcAddress Lib "kernel32" ( ByVal hModule As Long , ByVal lpProcName As String ) As Long
Private Declare Function CallWindowProc Lib "user32. dll" Alias "CallWindowProcA" ( ByVal lpPrevWndFunc As Long , ByVal hwnd As Long , _
ByVal msg As Long , ByVal wParam As Long , ByVal lParam As Long ) As Object
Private hLibrary As Long
#End If
Private objPdfClass As Object
'-------------------------------
' Zeki GÜRSOY - PdfClown VBA Lib.
'-------------------------------
Public Sub MergePDF( ByRef srcFileNames() As String , ByVal destFile As String )
Call objPdfClass. MergePDF( srcFileNames, destFile)
End Sub
Private Sub Class_Initialize()
#If Win64 Then
Dim myProc As LongLong
If Dir( CurrentProject. Path & "\PdfVbaLib64. dll") = "" Then
Err. Raise 1001, , "'PdfVbaLib64.dll' bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
hLibrary = LoadLibrary( CurrentProject. Path & "\PdfVbaLib64. dll")
If hLibrary = 0 Then
Err. Raise 1002, , "'PdfVbaLib64.dll' yüklenemedi." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
myProc = GetProcAddress( hLibrary, "NewPDFClass")
If myProc = 0 Then
Call Class_Terminate
Err. Raise 1003, , "'NewPDFClass' entry point bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
#Else
Dim myProc As Long
If Dir( CurrentProject. Path & "\PdfVbaLib. dll") = "" Then
Err. Raise 1001, , "'PdfVbaLib.dll' bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
hLibrary = LoadLibrary( destDir & "\PdfVbaLib. dll")
If hLibrary = 0 Then
Err. Raise 1002, , "'PDFVBALib.dll' yüklenemedi." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
myProc = GetProcAddress( myLib, "NewPDFClass")
If myProc = 0 Then
Call Class_Terminate
Err. Raise 1003, , "'NewPDFClass' entry point bulunamadı." & vbCrLf & "::.. Zeki GÜRSOY ..::"
Exit Sub
End If
#End If
Set objPdfClass = CallWindowProc( myProc, 0, 0, 0, 0)
End Sub
Private Sub Class_Terminate()
If hLibrary <> 0 Then Call FreeLibrary( hLibrary)
hLibrary = 0
End Sub
Hocam ilginize teşekkür ederim öncelikle.
Ben çalışmanızı inceledim fakat ekteki hatayı verdi. dll dosyaları ile beraber veritabanını masaüstüne çıkardım. dll leri başka bir yere mi kopyacalağım acaba?
Birde bu çalışmada belirli sayıda pdf i birleştiriyoruz sanırım. Ben bir klasör içerisine bazen 5 pdf atacağım bazen 10 pdf. İsim sırasına göre bunu nasıl birleştirebilirim.
Saygılarımla
Eklenti Dosyaları
Test.jpg (Boyut: 252,19 KB / İndirilme: 34)
Kayıt Tarihi: 12.03.2008
Toplam 80 konu açtı.
Toplam 631 yorum yaptı.
Toplam
75
puanı bulunmakta.
Mevcut Office Sürümü:
Office 2016 TR,
Beğeniler: 0 / 4
Ekteki hatanın sebebi tanımsız değişken kullanımından kaynaklı. O satırı, aşağıdaki satır ile değiştirin. (Zaten hatalıymış)
Visual Basic
hLibrary = LoadLibrary( CurrentProject. Path & "\PdfVbaLib. dll")
Dosya sayısı sabit değil... String tipinde dinamik dizi kullanmanız gerekiyor. Bunu bu başlığın altında anlatmak yakışık olmaz. Basit bir konudur; araştırıp öğrenmeniz sonraki projeler için de faydalı olacaktır.
Kayıt Tarihi: 27.11.2019
Toplam 76 konu açtı.
Toplam 308 yorum yaptı.
Toplam
19
puanı bulunmakta.
Mevcut Office Sürümü:
Office 2013,
Office 2016,
Office 2019,
Beğeniler: 18 / 4
(16-04-2021, 23:25) Zeki Gürsoy demiş ki: Ekteki hatanın sebebi tanımsız değişken kullanımından kaynaklı. O satırı, aşağıdaki satır ile değiştirin. (Zaten hatalıymış)
Visual Basic
hLibrary = LoadLibrary( CurrentProject. Path & "\PdfVbaLib. dll")
Dosya sayısı sabit değil... String tipinde dinamik dizi kullanmanız gerekiyor. Bunu bu başlığın altında anlatmak yakışık olmaz. Basit bir konudur; araştırıp öğrenmeniz sonraki projeler için de faydalı olacaktır.
Zeki Hocam,
Bu seferde ekteki hatayı verdi.
Saygılarımla
Eklenti Dosyaları
test2.jpg (Boyut: 243,43 KB / İndirilme: 37)
Kayıt Tarihi: 27.11.2019
Toplam 76 konu açtı.
Toplam 308 yorum yaptı.
Toplam
19
puanı bulunmakta.
Mevcut Office Sürümü:
Office 2013,
Office 2016,
Office 2019,
Beğeniler: 18 / 4
(16-04-2021, 23:25) Zeki Gürsoy demiş ki: Ekteki hatanın sebebi tanımsız değişken kullanımından kaynaklı. O satırı, aşağıdaki satır ile değiştirin. (Zaten hatalıymış)
Visual Basic
hLibrary = LoadLibrary( CurrentProject. Path & "\PdfVbaLib. dll")
Dosya sayısı sabit değil... String tipinde dinamik dizi kullanmanız gerekiyor. Bunu bu başlığın altında anlatmak yakışık olmaz. Basit bir konudur; araştırıp öğrenmeniz sonraki projeler için de faydalı olacaktır.
Zeki Hocam,
Bu seferde ekteki hatayı verdi.
Ek 11.Mesajdaki gibidir.
Saygılarımla