Hi Folks,
The Sit: We scan documents in on our copier which creates an unprotected pdf with an arbitrary name. I would like to iterate through a directory of such files and open each one, print it, and password protect against changes via code. I have had partial success in that I'm able to open a pdf and print it but I am stumped on how to assign the security. I know it can be done in C but I'd really rather do it in VB (translate as "I'm not a C person unless I really, really, really have to be and then I'm still not").

Anyway, if anyone has any clues on this it would be greatly appreciated.

Below is the code to do the printing

Dim a As CAcroAVDoc
Dim p As CAcroPDDoc
Dim i As Integer

Set p = CreateObject("AcroExch.PDDOC")
p.Open "FullPathAndFileName.pdf"

Set a = p.OpenAVDoc(p.GetFileName)

i = p.GetNumPages
a.PrintPagesSilent 0, i, 0, 0, 0
a.Close 0 'close with same name as when opened