Dear all
I have to print reports on "pdf files".
Each file must have a specific name related to the content of the report
Something like this:
Walter_7890.pdf
Mary_3432.pdf
I have tried with primoPdf but file name must be given manually for each file.
My code:
For x = a To b
DoCmd.OpenReport "Report1", acViewPreview, "", "Prot=" & x&
nLastName = DLookup("[lastName]", "table1", "[Prot] =" & x&)
nNumber = DLookup("[number]", "table1", "[Prot] =" & x&)
nn = "xx" & nLastName & nNumber & ".pdf"
DoCmd.PrintOut
DoCmd.Close
Next x
Thank you for your help
:banghead:
I have to print reports on "pdf files".
Each file must have a specific name related to the content of the report
Something like this:
Walter_7890.pdf
Mary_3432.pdf
I have tried with primoPdf but file name must be given manually for each file.
My code:
For x = a To b
DoCmd.OpenReport "Report1", acViewPreview, "", "Prot=" & x&
nLastName = DLookup("[lastName]", "table1", "[Prot] =" & x&)
nNumber = DLookup("[number]", "table1", "[Prot] =" & x&)
nn = "xx" & nLastName & nNumber & ".pdf"
DoCmd.PrintOut
DoCmd.Close
Next x
Thank you for your help
:banghead: