Main menu:

Site search

Categories

March 2024
M T W T F S S
« Feb    
 123
45678910
11121314151617
18192021222324
25262728293031

Tags

Blogroll

There’s always another way

I wrote my first code in 1986 on a Vic 20. In those days, printers were tremendously expensive compared to multi-purpose computers, so “publishing your code” meant writing it down by hand or saving it to a cassette your friend or client could then use, if they had a tape drive.

But back to printers and hard copy for humans. I got my first bubble jet printer in 1993 and my world was transformed. I could now work on documents at home and print them out and hand in my assignments. I even had a programme for drawing circuits, so there wasn’t anything work wise I couldn’t do with my trusty Amiga at home. FredFish disks meant software was affordable.

This trip down memory lane reminds me there are always other ways to approach how to get to the solution you want.

Recently, I’ve been working on modelling tools to enable augmented delivery (assisted not automated). Which has been great until someone asked for that to be delivered out to a Word document.

Microsoft Word, the industry standard word mangler with many interfaces to it including Powershell to allow automation.

Microsoft have gone one better though and produced Flow: a means of orchestrating tasks including, through a 3rd part add-on, “Creating docx from template”.

This looks like gobbledygook, but taking in a templated document and some input you can produce a new, instantiated in seconds. Reasonably easily.

Sounds like a lot of fuss…

Magically, it’s not.

Say I want to print out an invitation to an event. I could do a traditional mail merge or I could transform my address book in JSON format.

Each field would be very simply defined as “header”:”content”; “surname”:”Watkins”, “title”:”Ms”.

The headers I want to use would be placed into the document as {{surname}} for example.

In a couple of minutes, I’d have my Flow reading the template, applying the JSON formatted data and producing a new document.

All without having to touch Word to do this once the template were set up.

Write a comment