VBA Code error with Adobe Acrobat 10 Type Library
hi,
i have code created in word vba combine several separate pdfs single pdf. code works fine adobe acrobat 9.0 type library , adobe reader 9.0 installed.
but, adobe acrobat 10 type library , adobe reader 10 installed, code fails @ marked code below. suggestions??
dim acrobatapp acrobat.acroapp
set acrobatapp = createobject("acroexch.app")
dim mainpdf acrobat.acropddoc
set mainpdf = createobject("acroexch.pddoc") ****this code stops "type mismatch" error****
dim nextpage acrobat.acropddoc
set nextpage = createobject("acroexch.pddoc")
dim numpages integer
'loop through selected vls, , add each 1 end of main pdf
= 0 lstselected.listcount - 1
mainpdf.open curdir & "\" & replace(thisdocument.name, ".doc", "") & ".pdf"
numpages = mainpdf.getnumpages
nextpage.open lstselected.list(i)
if mainpdf.insertpages(numpages - 1, nextpage, 0, nextpage.getnumpages, true) = false then
msgbox "cannot insert pages"
end if
if mainpdf.save(pdsavefull, curdir & "\" & replace(thisdocument.name, ".doc", "") & ".pdf") = false then
msgbox "cannot save"
end if
'msgbox lstselected.list(i)
nextpage.close
next i
i doubt ever worked reader 9. using interface
that available when have adobe acrobat installed. there are
some features in iac (interapplication communication) api, it's
very limited. documentation tell what's available what's
not.
karl heinz kremer
pdf acrobatics without net
More discussions in Acrobat SDK
adobe
Comments
Post a Comment