Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

get pdf-document infos in vbscript

115 views
Skip to first unread message

Gunthard Reinkensmeier

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
Hi pdf-experts,

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


Roy Walter

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to
Something like:

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...

Roy Walter

unread,
Dec 6, 2000, 3:00:00 AM12/6/00
to

Gunthard Reinkensmeier

unread,
Dec 7, 2000, 3:00:00 AM12/7/00
to
Hi Roy, Hi PDF-experts,

Thank you! It works fine!

Greetings

Gunthard Reinkensmeier
Potsdam, Germany

gunthard.re...@gmx.net


"Roy Walter" <wa...@brookhouse.spamnot.co.uk> schrieb im Newsbeitrag
news:4WvX5.17393$Bh.126142@NewsReader...

> > Hi pdf-experts,

0 new messages