I want to list my .pdf-files in a VB script-output with their document
infos (title/subject/author/). Is there any documentation about accessing
the document infos in VB Script?
It would be great if someone could tell me sources for docs and/or sample
code.
Thanks,
Gunthard
gunthard.re...@gmx.net
Sub GetDocInfo()
Dim pdDoc As CAcroPDDoc
Dim t$, s$, a$, k$
Dim bOK As Boolean
Dim myPath$, myFile$
Set pdDoc = CreateObject("AcroExch.PDDoc")
myPath$ = "c:\westland\outbox\"
myFile$ = Dir(myPath$ & "*.pdf")
While myFile$ <> ""
bOK = pdDoc.Open(myPath$ & myFile$)
'could of course collect this in an array which would be more efficient
'the array would need to grow by 1 row for each file so use Redim
Preserve etc.
t$ = pdDoc.GetInfo("Title")
s$ = pdDoc.GetInfo("Subject")
a$ = pdDoc.GetInfo("Author")
k$ = pdDoc.GetInfo("Keywords")
'now do something with this info'
pdDoc.Close
myFile$ = Dir
Wend
Set pdDoc = Nothing
End Sub
--
Roy Walter
Brook House Limited
http://www.brookhouse.co.uk
Gunthard Reinkensmeier <gunthard.re...@gmx.net> wrote in message
news:90lpu6$rtm$01$1...@news.t-online.com...
Thank you! It works fine!
Greetings
Gunthard Reinkensmeier
Potsdam, Germany
"Roy Walter" <wa...@brookhouse.spamnot.co.uk> schrieb im Newsbeitrag
news:4WvX5.17393$Bh.126142@NewsReader...
> > Hi pdf-experts,