Google Docs

Most of the material concerning Google Apps Script on this site is about Google Spreadsheets. You can also use GAS to extend Google Documents. There is an exciting new capability called add-ons

Here's an add-on for pinyin conversion. 

Pinyin is an easy way of writing Mandarin Chinese using the Latin alphabet. It uses tone markers as a guide to pronunciation. However, it is difficult to enter these tone markers on a regular keyboard. That is why a system of tone numbers (1-5) can be used to imply particular tone marks. There is also a spreadsheet pinyin converter for Google Sheets or Excel on this site.

This converts Pinyin tones to and from Pinyin markers by analyzing valid character combinations, and shows the result in the sidebar to the right. The text in scope will be that in the current paragraph or bullet point, or some other text fragment. There is no need to say which direction you are converting, or even to worry too much whether the paragraph is even Pinyin.  

Some snippets



For help and more information join our forumfollow the blogfollow me on twitter

You want to learn Google Apps Script?

Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, available All formats are available now from O'Reilly,Amazon and all good bookshops. You can also read a preview on O'Reilly

If you prefer Video style learning I also have two courses available. also published by O'Reilly.
Google Apps Script for Developers and Google Apps Script for Beginners.