|
这个也是在网上找的,很有用
Sub NewPDF()
Dim ok As Boolean
Dim PDFApp As Acrobat.AcroApp
Dim pddoc As Acrobat.AcroPDDoc
Dim tempPDDoc As Acrobat.AcroPDDoc
Set PDFApp = CreateObject("AcroExch.App")
Set pddoc = CreateObject("AcroExch.PDDoc")
Set tempPDDoc = CreateObject("AcroExch.PDDoc")
If Not tempPDDoc.Open("D:\output\1.pdf") Then
Set tempddoc = Nothing
Set pddoc = Nothing
Set PDFApp = Nothing
MsgBox Err.Number & ": " & Err.Description, vbOKOnly + vbCritical, "Ïμí3DÅÏ¢"
Exit Sub
End If
ok = pddoc.Open("D:\output\Excel.pdf")
If ok <> -1 Then
ok = pddoc.Create()
End If
Call pddoc.InsertPages(pddoc.GetNumPages() - 1, tempPDDoc, 0, tempPDDoc.GetNumPages(), False)
ok = pddoc.Save(1, "D:\output\Excel.pdf")
Call pddoc.Close
tempPDDoc.Close
PDFApp.Exit
Set pddoc = Nothing
Set tempPDDoc = Nothing
Set PDFApp = Nothing
End Sub
|
评分
-
1
查看全部评分
-
|