vb编程打开pdf文件,然后另存为操作(visual basic--adobe acrobat)
各位大侠 前辈们我需要用vb编程打开pdf文件然后另存为pdf文件,请问代码如何编写?我已经引用了adobe acrobat7.0
我从网上拷贝过来然后自己更改了一下但是还是有很多错误,可否抽空帮我改改
非常感谢
Private AcroXApp As CAcroApp
Private AcroXAVDoc As CAcroAVDoc
Private AcroXPDDoc As CAcroPDDoc
Private Sub Command1_Click()
On Error Resume Next
CommonDialog1.Filter = "*.pdf|*.pdf"
CommonDialog1.ShowOpe
Set AcroXApp = CreateObject("AcroExch.App")
Set AcroXApp = CreateObject("Acrobat.CAcroApp") '''''''''''''''''''创建对象
Set AcroXPDDoc = AcroXApp.acrobat.CAcroPDDoc.Open(CommonDialog1.filename) '打开已经存在文件"
Set AcroXPAVDoc = AcroXApp.CAcroPDDoc.Open(CommonDialog1.filename) '打开已经存在文件"
AcroXApp.DisplayAlerts = False
AcroXApp.Visible = True '''''''''''''''''''''''''''''''''''''''''''设置E象可见
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
End With
acroaxapp.acrobat.CAcroPDDoc.SaveAs "d:\已读文件" & Mid(CommonDialog1.FileName, InStrRev(CommonDialog1.FileName, "\") + 1) & "."
acroaxapp.acrobat.CAcroApp.Quit
AcroApp.quit
end sub
页:
[1]