Opening PDF files in sequences

Hello all!

I’m really hoping one of you will be able to help me because I’m all out of ideas.

So here is what I’m trying to do:

In a folder, I have 10 files (PDFs). I need the bot to open the first file, tick on a certain box, print the file, close the file, then do the same thing with the next file in the folder. So far I’ve been able to automate the first file but I seem to find a way to make the loop work. I tried “For each file in the folder” but it open all files at the same time which cause other problems.

I would really appreciate it if anyone of you could help me or point me in the right direction.

Thank you!

Max

Do a:
List = Directory.GetFiles(pdffolderpath,"*.pdf”)
Then use a ForEach item in the above list and put your process in that sequence.
Pass the item as value to your current process, so that it works for each pdf.

2 Likes

Hi Nadim,

I’m still a rookie, so your answer is a bit to short for me to really understand. Could you please elaborate on the steps or have an example?

Thanks!

Max

1 Like

2 Likes

Thanks!

What is the variable type of ImageList?

Ok I think the variable type is supposed to be an array of string.

The only probleme i have now is that the file are not opening…

Can you paste the Dir.GetFile assign you are using and the variable assign you are passing to open the pdf?

In fact, I am working with taxprep files (I tried to simplified the situation for you).

Thanks!

if your files are all .227 then the assign is fine.
But your loop body is incorrect.

Are you directly using click?
You had automated the process which was working fine for you right?
I mean:

  1. Open that pdf
  2. The click etc

Put that whole logic in the body, just that your pdf path now will be = item

Thanks! I figured it out because of you. See my final sequence below:

Max

1 Like

Awsme! happy to help :slight_smile:

Keep automating!