How to convert multiple docx. files to convert .pdf files from any folder?

Hi,
I have one folder and it’s full of .docx files. I want to convert them to separate .pdf files with same .docx names.
I tried to For each and Convert Word to PDF activities but I cannot show(or define) all files path for converting to .pdf. (Only files folder path I cannot define)
When I define directly file’s path it’s works for 1 file, but I need to convert multiple .docx files at once.
What is the solution for it?

Thank for your help.

Regards,
Cimcoz

Hi
Welcome to uipath community
Hope these steps would help you resolve this
—use a assign activity like this
arr_filepath = Directory.GetFile(“yourfolderpath”),”*.docx”)

Where arr_filepath is a variable of type array of string

—now use a FOR EACH activity and mention the above variable as input and change the type argument as string

—inside the loop use the activity that you used to convert them pdf but with input file path as item.ToString

Cheers @cimcoz73

Hi,
Thanks for your help. But I already did what you wrote. With the new .pdf files created but all .pdf files are empty as white page.

.docx contents not exists in to the .pdf file.

Regards,

Did you try Export to PDF activity?

Fine
Instead of activity you are using we got an exclusive activity for this
Go to Deisgn tab-> Manage Packages option -> in Official yah -> and search as UiPath.Word and install that activity

—then coming back to studio instead of your current activity for converting docx to pdf replace with WORD APPLICATION SCOPE and mention the filepath of item.ToString as input
Inside that scope use a EXPORT TO PDF activity where mention the folder path where to save the file as pdf

Cheers @cimcoz73

I installed already related packages.
And tried to make what you wrote but EXPORT TO PDF is not works as you mentioned.

Fine
may i know the issue you are facing
@cimcoz73

With EXPORT TO PDF not working.

current setup works (in first message) new .pdf files created but all .pdf files are empty as white page.

.docx contents not exists in to the .pdf file.

Regards,