Many thanks tlnet. Sorry, yes WP X5. Build is 15.0.0.528, a number that suggests it is later than the 15.0.0.512 you quote. I had already tried a"Repair" but repeated it today. No improvement.
Windows is 10 Home: version 1803, Build: 17134.345
I have, however, found an easy way round the problem. With the document open in the WP window, click on "Print" and change the printer to "Microsoft Print to PDF". A dialogue box opens and you save the file in in PDF format.
Would still be interested to know how to solve the WP error tho.