I'm trying to create a Word File by using the "Populate a Microsoft Word Template" action from Word Online (Business) Connector. After sucessfuly creating the template and making it recognizable by the Flow action, I tested it and received the following error:
Error code says:
Solved! Go to Solution.
I wrote a blog overview of the Word Online connectors. Check it out here: https://www.dmcinfo.com/latest-thinking/blog/id/9838/overview-of-microsoft-flows-new-word-online-con...
Please give kudos and mark as the solution if it works!
Hi @danmitchell36 ,
Unfortunately, your link is down for me. I can't seem to access it.
Edit: I have followed exactly the steps you outlined and it still does not work. Do you have any other tips?
@Dana I don't think you actually read his question, as your blog mentions nothing about the issue he is having.
We are also having the same issue with a word document, flow refuses to process the document template with an internal error of "Object reference not set to an instance of an object".
+1 to OP for a well written example of the problem.
I have used the Microsoft Word connectors on a number of projects and have never seen that issue before. While my post didn't address his issue directly I hoped that if he followed the instructions in the blog post he would be able to resolve the issue.
@Gaiarsa I managed to fix this problem by deleting and re-inserting all content controls as plain-text (you can only utilise plain-text, combo and dropdown with this connector currently).
The document I am working on came from a 3rd party courier with a lot of content controls already inserted, we want to populate this document with data that we have in sharepoint etc.
Rather than manually removing and re-inserting all of the content controls, I wrote some vba to do it for me. Insert that into a module in the word vba editor and run it (F5), and you should no longer get this error. This obviously means the error was related to one or more of the content controls that were inserted (although I had already forced all to plain text before re-inserting and that didnt fix it).
Sub CleanseControls() Dim existingControls As New Collection Dim cc As ContentControl Dim newcc As ContentControl For Each cc In ActiveDocument.ContentControls existingControls.Add cc Next cc For Each cc In existingControls
Dim tag As String: tag = cc.tag Dim title As String: title = cc.title cc.Range.Select cc.Delete Set newcc = ActiveDocument.ContentControls.Add(wdContentControlText) newcc.title = title newcc.tag = tag
Next cc End Sub
Check out the on demand sessions that are available now!
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.