spectrummopa.blogg.se

Insert pdf into word document acroexch error
Insert pdf into word document acroexch error








insert pdf into word document acroexch error

MsgBox "Pdf files combined successfully!", vbExclamation MsgBox "Error saving combined pdf:" & vbCrLf _ If Not (.Save(PDSaveFull, sPdfComb)) Then MsgBox "Error inserting source pdf:" & vbCrLf _ GetNumPages, PdfSrc, 0, PdfSrc.GetNumPages, 0)) Then MsgBox "Error opening source pdf:" & vbCrLf _ If Dir(sPdf, vbArchive) = vbNullString Then Exit Do & vbCrLf & vbTab & "Procees will be cancelled!", vbCritical MsgBox "Error opening destination pdf:" & vbCrLf _ SPdf = ThisWorkbook.Path & "\" & "firstpdf" & b & ".pdf" SPdfComb = ThisWorkbook.Path & "\" & "Pdf Combined" & Format(Now, " mmdd_hhmm ") & ".pdf" 'change as required Rem Set Combined Pdf filename - save the combined pdf in a new file in order to preserve original pdfs Sub PDFs_Combine_EarlyBound()ĭim PdfDst As AcroPDDoc, PdfSrc As AcroPDDoc To create the Vb Reference to the Adobe Library in the VBA Editor menu click Tools`References then select theAdobe Acrobat Library in the dialog window then press theOK` button. Solutions: These procedures use the Adobe Acrobat Library

  • The objCAcroPDDocDestination was never opened.
  • If objCAcroPDDocDestination.InsertPages(objCAcroPDDocDestination.GetNumPages - 1, objCAcroPDDocSource, 0, objCAcroPDDocSource.GetNumPages, 0) Then ObjCAcroPDDocSource.Open ThisWorkbook.Path & "pathwithpdfs" & PDFfileName
  • These lines would have returned: Error - 424 Object required as the objects objCAcroPDDocSource and objCAcroPDDocDestination were not initialized:.
  • Therefore this line always returns "" (no pdf file was found in the ThisWorkbook.Path):.
  • It should be PDFfileName = Dir(ThisWorkbook.Path & "\" & "firstpdf" & n & ".pdf")
  • This line is missing the path separator "\": PDFfileName = Dir(ThisWorkbook.Path & "firstpdf" & n & ".pdf").
  • insert pdf into word document acroexch error

    All variables should be declared: Dim objCAcroPDDocSource as object, objCAcroPDDocDestination as object.Pdf files names go from firstpdf1.pdf to firstpdfn.pdf where n is the total number of files to be combined.Combined a series of pdf files, located in the same folder of the workbook containing the procedure.This is my understanding of your question:










    Insert pdf into word document acroexch error