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