I have a scheduled flow that runs once a week and creates Word documents from a template. I have the premium Word connector so I can convert each of the Word documents to PDF. I want to loop through the library and convert multiple documents to PDF. Is this something I can do with the Word action? It looks like it's forcing me to choose a specific file and convert that file. I have tried populating variables with the file path and file name and adding those into the action, but it errors out.
Is it possible to use Apply to Each and loop through the Word documents to convert each of them to PDF? Or do I have to use a Switch and do them all separately?
If I have to use a Switch and do them all separately, how can I build the flow dynamically so it can count the number of documents in the library and convert them? The number will change weekly.
We would prefer not to use OneDrive, but if that's the only way to make this work, so be it. Any suggestions are welcome.
Hi @This-n-That ,
Are you using the following Action to convert word to PDF? The problem you are currently encountering is that you don't want to use this action, you want to create a flow that runs on time, which can automatically convert word to PDF.
Whether to use OneDrive depends on where your files are saved. If you can use the action in OneDrive to get the file, then I suggest you use the action in OneDrive to convert the file to PDF.
The following is the main content of my test:
1)Get all files in a folder.
2)Operate on each file. I use a condition to determine if the file in the folder is already in PDF format.
Hope this helps you!
-------------------------------------------------------------------------------------------------------------------------------
If my answer solves your problem, please accept it as a solution to help more people stuck on the same problem find it.
Best regards,
Rimmon Li
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional