We're converting SharePoint documents to PDF via Flow.
It takes about a minute to convert a 100kB Word file to a PDF with all the same SharePoint metadata.
Some Quickparts that's take data from SharePoint columns (also available in the Document Information Panel) are not displayed correctly once a file is copied to OneDrive for Business. It's then converted to PDF incorrectly.
We use the OneDrive for Business (OD4B) PDF converter, which I can only get working on local documents in OneDrive. This means we have to copy the SharePoint (SP) document to OD4B before starting the conversion. The PDF is then copied back to the SP doc libary and metadata updated.
1 SP - For a selected item
2 SP - Get item
3 SP - Get file content
4 OD4B - Create copy of source file on OneDrive
5 OD4B - Convert file using path (Preview) - type PDF
6 OD4B - Create PDF on OneDrive
7 OD4B - Get PDF file content
8 SP - Create copy of PDF in doc library
9 SP - Get PDF item ID
10 SP - Update PDF columns
11 OD4B - Delete copied source file
12 OD4B - Delete pdf
Reproducing the error
We use Quick Parts from SharePoint columns to input controlled document information.
The data is editable in the document information panel (DIP).
This information is changing at the first OD4B step, step 4.
In particular, lookup columns seem to return the list location, not the list value.
e.g. Document type: "Report", instead displays "4" (user selects from list: Calculation, Specification, Proposal, Report etc.)
From further testing outside of Flow, it appears that SharePoint DIP / quickparts don't work after a document is copied into OneDrive for Business.
If said doc is opened in Word online, it displays correctly
If said doc is opened in Word client, it throws this error:
Some external data was not retrieved. The form will load without the requested data.
(more details - this repeats for each error)
The query cannot be run for the following DataObject: list_22a361f3-b0c4-4912-a250-43095581c6e7
Document Information Panel cannot run the specified query.
The SOAP response indicates that an error occurred on the server:
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
List does not exist.
The page you selected contains a list that does not exist. It may have been deleted by another user.
So I'm guessing the XML docprops, which rely on the original Sharepoint column information, lose their datasource when the document is copied out of the Sharepoint library.
Thanks in advance for any workarounds / solutions.
Solved! Go to Solution.
Could you please share a screenshot of your flow's configuration?
Could you please show more details about your issue?
I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:
The flow works successfully as below:
The PDF file opens well as below:
Please also check and see if the following thread would help in your scenario:
More details about strating a flow from Flow Launch Panel of SharePoint list or library, please check the following article:
Hi Kris, your Flow is identical to mine (no need for screenshot) and works well - just like mine does - on documents that don't contain Sharepoint lookup column quickparts.
The issue I described is that the process of copying the Word file to OneDrive breaks the link to Sharepoint column data, so it doesn't display or convert to PDF correctly.
Example images below.
Because the file is copied out of Sharepoint, I wouldn't expect the Quickparts to still be linked, however they don't even display the old value. They display the list item ID #.
So, can these be updated in OneDrive? e.g. modifying XML, update Word file etc.
Watch Microsoft Business Applications Summit sessions on-demand.
The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications