Extract Adobe Acrobat embedded Object

Simple Question what is the method for Adobe Acrobat. This works with MS but not with acrobat. It does not recognize “SaveAs” ( "Automation Object Member Not Found) but it activates the PDF. Thanks in advance.

===========Code Sample =============

Select Case rtItem.Type

Case EMBED_OBJECT:

  If rtItem.Class = "AcroExch.Document.7" Or rtItem.Class = "AcroExch.Document" Then

					Set handle = rtItem.Activate(True)

Call handle.SaveAs("C:\Temptest1.pdf")

End If

================================

Subject: Extract Adobe Acrobat embedded Object

This is an old problem that has no solution as far as I know.The Acrobar objects do not have an exposed “Save as” method.

In other words, this won’t work.

Subject: RE: Extract Adobe Acrobat embedded Object

Well perhaps not “SaveAs” but “SaveCopyAs” or any other name. There is got to be a way of getting that embedded object out of the document. I think I am missing a library or something for Adobe.

Subject: RE: Extract Adobe Acrobat embedded Object

It ain’t necessarily so – the decision not to include a SaveAs in the OLE control might have been quite deliberate on Adobe’s part. That would be consistent with the content access restrictions in their family of viewer/reader apps/plugins, and it probably addresses customer IP concerns.

Subject: Extract Adobe Acrobat embedded Object

Here is the answer:

1 - Here are 2 good sources of reference from ADOBE.

http://www.adobe.com/devnet/acrobat/pdfs/iac_developer_guide.pdf

http://www.adobe.com/devnet/acrobat/pdfs/iac_api_reference.pdf

2 - The handle out of this instruction is basically useless:

          Set handle = rtItem.Activate(True)

So we need to get the active record using the Adobe Acrobat OLE Automation code.

3 - Here is the code:

Case EMBED_OBJECT:

If rtItem.Class = “AcroExch.Document.7” Or rtItem.Class = “AcroExch.Document” Then

Set AcroExchApp = CreateObject("AcroExch.App")

Set AVDoc = CreateObject("AcroExch.AVDoc")

Set PDDoc = CreateObject("AcroExch.PDDoc")

Set handle = rtItem.Activate(True)

Set AVDoc = AcroExchApp.GetActiveDoc()

Set PDDoc = AVDoc.GetPDDoc()

If PDDoc.Save(1, "C:\Temptest1.pdf") = False Then

	Msgbox "Unable to save image"

	Else

	Msgbox "The file is saved"

	End If

End If

End Select