Hi Team
I am excited to interact with you to get to know more on Power Automate with AI builder. I would appreciate if you could help me extracting author comments in MS word using Power Automate with AI builder and importing into an excel as classified author comments.
Thanks
Ramamurthy Jagannathan
Building on the query above, it would be amazing to be able to pull comments out of a document and capture not only the attributes that are native to the comment (comment text, author, date, highlighted text, page number), but also better information about where the comment appears in the document. As a lawyer, I am usually working with contracts. Those that are drafted by experienced Word users include a numbered headers and subheads that are implemented using styles. Those that are drafted by less experienced users still have numbering, but it is implemented as you would on a typewriter (i.e., not connected to styles or other numbered list formatting). It would be amazing to be able to extract comments that included a section reference. I've seen some attempts at doing this, but non that worked well. Even though it looks like a structured doc on the page, and feels like a structured document when you start using linked cross-references, my understanding is that there is no hierarchical structure at the XML level (e.g., cross-references are enabled by Word in the background by doing iterative passes through the document and adding randomly-numbered bookmarks wherever styles changes).
Looking at this a little more today, by comments I assume you mean the actual comments that are off to the side of the word document. One way you'll be able to do this is by taking the file, and unziping it and then pulling the comments.xml file out from the extracted folder. This link will give you a rough idea of what steps you'll be needing. If it's more than just the author commenting, you'll have to have another step to get the file metadata (I think) will give you the author/created by name. You'll then have to parse author value out of the comments.xml
<?xml version="1.0" encoding="utf-8"?>
<w:comments xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:comment w:initials="SD" w:author="zxxx" w:date="2022-08-19T07:58:44" w:id="1651651">
<w:p w:rsidR="1E05sd99" w:rsidRDefault="1E05asd99" w14:paraId="69EE3CF3" w14:textId="0DDEA047">
<w:pPr>
<w:pStyle w:val="CommentText" />
</w:pPr>
<w:r w:rsidR="1E051199">
<w:rPr />
<w:t>creating comments</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rStyle w:val="CommentReference" />
</w:rPr>
<w:annotationRef />
</w:r>
</w:p>
</w:comment>
<w:comment w:initials="SD" w:author="xxxx" w:date="2022-08-19T08:26:56" w:id="252370751">
<w:p w:rsidR="10166B43" w:rsidRDefault="10166B43" w14:paraId="46E80C36" w14:textId="5C532590">
<w:pPr>
<w:pStyle w:val="CommentText" />
</w:pPr>
<w:r w:rsidR="10166B43">
<w:rPr />
<w:t>Second Comment</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rStyle w:val="CommentReference" />
</w:rPr>
<w:annotationRef />
</w:r>
</w:p>
</w:comment>
</w:comments>
Hello @Ramamurthy
Unfortunately it's not possible to use AI Builder in Office documents for now. If you manage to turn your Word into PDF, you will be able to extract information from the file using the AI Builder Document processing model.
Let us know if you have other questions on AI Builder!
I think you need to look into office scripts action, there is a different board on here regarding ai builder, that they might be able to better advise you
Hi @Ramamurthy - this is a great question for the AI Builder community - i will move it there.
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional