Cloud-Kumpel / CloudKumpel

Repo for the Cloud Kumpel site
https://www.cloudkumpel.de
MIT License
1 stars 0 forks source link

2021/10/30/Power-Automate-Create-SharePoint-Page-from-Word-document #2

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Power Automate - Create SharePoint Page from Word document | CLOUD KUMPEL

Hey folks, recently I came across a question in the Power Automate community forum, where retrofuture came up with the question to generate a SharePoint Page filled with a word document content uploaded/created in SharePoint Online. The basic idea came from a Youtube video by Lernen Tech / Krishan Sharma, who used a SharePoint list. In this article you will learn how to get the content from a Word document and publish it on a new SharePoint page.

https://cloudkumpel.de/2021/10/30/Power-Automate-Create-SharePoint-Page-from-Word-document.html

jasonkirk-tech commented 2 years ago

This is amazing. Even just the way to extract Word document content without having to go premium. This opens up a whole new series of merging and working with documents in a standard license setting.

Then posting a SharePoint page is something that been on my list to work out. Would this work as a News Post too? Did you get that option? I will be trying this who process out myself soon. Thanks again.

MarvinBangert commented 2 years ago

Hey @TH3Cap7a1n26 thanks for your comment, I didn't test it with news post in a while, but also should work. I should check it out and maybe update this also with news post!

mjburley commented 2 years ago

Hi, Thanks for the detail in this article, which I followed and works well.

In my case I am trying to extract different strings out of the Word (template) file, so instead of the w:t text

//*[name()=''w:t'']/text()')

I am trying to get the values from:

but I cannot work out how to refer to these with xpath. I've tried various ways but always get an empty array back - examples: xpath(xml(body('Get_file_content_using_path')), '//@w:tag/@w:val/text()') xpath(xml(body('Get_file_content_using_path')), '//*[@'w:id']') Etc.

Any ideas how to refer to these elements?

Thanks, Mark

Full chunk of XML:

    <w:sdtPr>
        <w:rPr>
            <w:rFonts w:cs="Tahoma"/>
            <w:color w:val="000000"/>
            <w:szCs w:val="28"/>
        </w:rPr>
        <w:alias w:val="Organisation"/>
        <w:tag w:val="Organisation"/>
        <w:id w:val="1938709613"/>
        <w:placeholder>
            <w:docPart w:val="057F9AEFB56E42B38153A11E699DDE9F"/>
        </w:placeholder>
        <w:text/>
    </w:sdtPr>