Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

PDF a Sharepoint Word document, OneDrive breaks Doc Info

(0) ShareShare
ReportReport
Posted on by

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.

 

Issue

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.

 

Flow summary

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.)

 

More information

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.
<detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    List does not exist.
    The page you selected contains a list that does not exist.  It may have been deleted by another user.
    </errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x82000006</errorcode></detail>

 

...

 

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.

 

Request

Thanks in advance for any workarounds / solutions.

 

  • Verified answer
    CU07080701-0 Profile Picture
    on at
    Re: PDF a Sharepoint Word document, OneDrive breaks Doc Info

    Just to close this one out, the newish Convert Word to PDF, Word online (Business) connector solves this issue.

  • CU07080701-0 Profile Picture
    on at
    Re: PDF a Sharepoint Word document, OneDrive breaks Doc Info

    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.

     

    What is displayed in Sharepoint (Word 2013)What is displayed in Sharepoint (Word 2013)How it comes out - Sharepoint lookup column data wrongHow it comes out - Sharepoint lookup column data wrong

    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.

  • v-xida-msft Profile Picture
    on at
    Re: PDF a Sharepoint Word document, OneDrive breaks Doc Info

    Hi @johnnyshield,

     

    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:1.JPG

     

    2.JPG

    The flow works successfully as below:3.JPG

    The PDF file opens well as below:4.JPG

     

     

    Please also check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/General-Flow-Discussion/Get-a-file-FROM-Sharepoint-Doc-Library-TO-OneDrive-for-Business/m-p/114474/highlight/true#M12835

     

    More details about strating a flow from Flow Launch Panel of SharePoint list or library, please check the following article:

    https://flow.microsoft.com/en-us/blog/introducing-flow-launch-panel-in-sharepoint-lists-and-libraries/

     

     

    Best regards,

    Kris

  • CU07080701-0 Profile Picture
    on at
    Re: PDF a Sharepoint Word document, OneDrive breaks Doc Info

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >