Has anyone successfully created a PDF file from a Microsoft Word Document using Flow?
I am able to create a flow that passes the new 'flow checker' but the PDF file is not viewable. I receive the following message when trying to view the PDF file:
Error
Failed to load PDF document.
Solved! Go to Solution.
Hi @kelliprieto,
Could you share a screenshot of your Flow configuration?
I have made a test on my side and the flow works well. Please take a try with the following workaround:
Use Condition to determine the file type and see if its filename with extension ends with ".doc/.docx".
If yes, get the file content, convert the file format with OneDrive-Convert file action, and create a new file with Create file.
Finally, consider deleting the transition file created in OneDrive.
Image reference:
Expression:
or(endsWith(triggerBody()?['{FilenameWithExtension}'],'.doc'),endsWith(triggerBody()?['{FilenameWithExtension}'],'.docx'))
Please take a try.
Best Regards,
Barry
I have been able to do it using One drive. I used the below as a reference to set mine up and it works.
Hi @kelliprieto,
Could you share a screenshot of your Flow configuration?
I have made a test on my side and the flow works well. Please take a try with the following workaround:
Use Condition to determine the file type and see if its filename with extension ends with ".doc/.docx".
If yes, get the file content, convert the file format with OneDrive-Convert file action, and create a new file with Create file.
Finally, consider deleting the transition file created in OneDrive.
Image reference:
Expression:
or(endsWith(triggerBody()?['{FilenameWithExtension}'],'.doc'),endsWith(triggerBody()?['{FilenameWithExtension}'],'.docx'))
Please take a try.
Best Regards,
Barry
That worked! Thank you!
I am trying to do something similar but my use case is a little different. In short, I would like to convert a submitted Form (O365 Forms) and send the results as a PDF document to either a SharePoint list or document folder. So far I have created a Flow that can do the following.
My Flow is successful to this point.
At this point, I tried adding the steps in this solution beginning with Get File Content. It looks like I can use the Name parameter to get the created file name but I do not see how I can add the SharePoint folder path. When I hard code the filename, I get the step to work. Any suggestions?
When you select the "create file" action for SharePoint, you should be able to select the site then the folder path in a dropdown. If not, you can manually enter the folder path.
It is also possible to send your form results to a SharePoint list by using the "create item" Sharepoint action. Before you create this flow, you'll need to create corresponding columns for the form results (questions) in the SharePoint list. These columns will be referenced in the "create item" step.
Hi Barry,
This solution is no longer working. Did the Flow actions change?
I can create PDFs but the PDF file content cannot be viewed.
Kelli
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
85 | |
60 | |
51 | |
43 | |
39 |
User | Count |
---|---|
89 | |
81 | |
74 | |
62 | |
44 |