February 2014
Beginner to intermediate
178 pages
4h 2m
English
A complete example including every method would be very long, so I'll show a simplified layout to show how it works, but that only identifies every type of element and replaces a paragraph with an image if a predefined placeholder =='###', is found in the paragraph.
You should easily be able to implement a more universal version yourself that adds or modifies elements based on certain conditions. Test the following code in a text document, such as the one we just created with our recipes.
function findMarkAndReplace() { var Doc = DocumentApp.getActiveDocument(); var image = DocsList.getFileById('0B3qSFd3iikE3UmpjelRQdlZmQXc'); // this is an image from the recipe's example stored on my drive and shared ...Read now
Unlock full access