T
ToddC
I am in the process of converting between document managment systems and as a
part of this exercise, I need to extract all embedded documents from word
docs. For MS Office embedded docs (.doc, .xls, .ppt) I am able to perform an
oleFormat.Activate and then perform a saveas method to save the embedded
document.
BUT, when trying to save a PDF, I am able to launch it, but there is no save
method available. Does anyone have suggesions about how to best approach
this? Here is a code snippet of what doesn't work, similar code works for MS
Office docs.
For iCtr = 1 To oDoc.InlineShapes.Count
If oDoc.InlineShapes(iCtr).OLEFormat.ProgID = "AcroExch.Document.7" Then
Set oPDF = CreateObject("Acrobat.AcroApp")
oDoc.InlineShapes(iCtr).OLEFormat.Activate
oDoc.InlineShapes(iCtr).OLEFormat.Object.SaveAs FileName:=iCtr & ".pdf"
oPDF.Exit
End If
next iCtr
thanks in advance for your help!
part of this exercise, I need to extract all embedded documents from word
docs. For MS Office embedded docs (.doc, .xls, .ppt) I am able to perform an
oleFormat.Activate and then perform a saveas method to save the embedded
document.
BUT, when trying to save a PDF, I am able to launch it, but there is no save
method available. Does anyone have suggesions about how to best approach
this? Here is a code snippet of what doesn't work, similar code works for MS
Office docs.
For iCtr = 1 To oDoc.InlineShapes.Count
If oDoc.InlineShapes(iCtr).OLEFormat.ProgID = "AcroExch.Document.7" Then
Set oPDF = CreateObject("Acrobat.AcroApp")
oDoc.InlineShapes(iCtr).OLEFormat.Activate
oDoc.InlineShapes(iCtr).OLEFormat.Object.SaveAs FileName:=iCtr & ".pdf"
oPDF.Exit
End If
next iCtr
thanks in advance for your help!