0

Private Sub Command1_Click()
Dim PDDoc As Object
Dim AVDoc As Object
Dim AcroExchApp As Object
Dim PDSaveFull As Object
AcroExchApp.GetActiveDoc
Set AcroExchApp = CreateObject("AcroExch.App")
AcroExchApp.GetActiveDoc
AVDoc.GetPDDoc
PDDoc.Save

Set PDDoc = AVDoc.GetPDDoc

If PDDoc.Save(PDSaveFull, "c:\test.pdf") = False Then
MsgBox "Unable to save image"
Else: MsgBox "The file is saved"
End If


End Sub

getting an error 91 whats wrong plzz help

2
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by vb5prgrmr
0

avisek_cts,

I'm glad to see you created your own post so ignore my comments in the other thread you perhaps accidently posted to. Next time if you do something like that, click on the Flag Bad Post link and explain your boo boo.

Switch these two...

AcroExchApp.GetActiveDoc
Set AcroExchApp = CreateObject("AcroExch.App")

to

Set AcroExchApp = CreateObject("AcroExch.App")
AcroExchApp.GetActiveDoc

because you are trying to give the object a command before you have created it.


Good Luck

0

what do u mean by swithing these two..can u plz give me the code what to write

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.