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

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

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

You posted the code... take a look at what you posted and my suggestion...


Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.