No-code magic for document automation

The magic of SharePoint automatically adding document properties to word files

Henrik Hjertstedt
2 min readJan 22, 2021

When I first started working with contract automation over five years ago I was searching the Internet for ways to automatically insert text into Word documents. All I could find was demos and video instructions using Visual Basic, Building Blocks or other complicated methods to insert fields. These methods did not work for me. Either they needed me to learn a new programming language, which took way too much time, or they did not achieve the flexibility I needed.

Picture of template contract with fields marked
Source: https://www.savelegalfees.info

I wanted to be able to have other people enter information directly into the contract templates. I had lots to do at work and at home with little time for anything. So I didn’t want to spend my time typing things into my template documents. It made me feel bad when I had spent six years at university to become a lawyer only to be typing company names and addresses into a document.

I was close to quitting my search for a solution. I had already spent a lot of time trying to find a solution which meant I had even less time for my work. Then, one day I was looking at a document I had added to a SharePoint Document Library and I saw that — almost magically — one of the values I had entered into SharePoint had made its way into my Word document. I closed the document, changed the value in SharePoint and opened the document again. Amazing! The text in my Word document had changed. Then I noticed that all the other columns from my Document Library were available as document properties in my Word document.

With this new technique I could automatically change the contents of my Word document without opening it and without any coding. All I needed to do was add my template document to my Document Library and SharePoint would automatically add the columns as document properties in the Word document. To achieve my goal of not typing into my templates I just needed to place the document property tags in my document.

It was that easy all along to achieve my goal of document automation! This way adding custom properties to a Word document is so easy anybody can do it. Just upload the document your a SharePoint document library and the custom properties appear.

If you want to stop typing and get other people to happily do your work for you then you need to try out this technique. I hope this helps you a lot to achieving no cost contract automation.

--

--

Henrik Hjertstedt

Lawyer and Citizen Developer. Founder of LawChatGPT.com. Passionate for digitalising and automating legal work.