Apps Script Lesson Select Emails using Regex on Doc Body text apply style for highlighting selection

Highlight emails in a Doc using Regex on Doc Body Contents Select all matching results from a Regex for email patterns.  Creates an array of the emails contained in the doc, then applies styling to the email.  Highlight the matching results with a yellow background and black text. function onOpen(){  DocumentApp.getUi()  .createMenu(’emails’)  .addItem(‘Highlight’,’highlighter’)  .addToUi() } … Read more

How to Copy All Images from Doc into your Google Drive apps script blob file creator

Copy All Images from Doc into your Google Drive Example will extract all the images from a Google Doc and make copies of them directly into your Google Drive. function onOpen(){  DocumentApp.getUi()  .createMenu(‘images’)  .addItem(‘creator’,’getImgs’)  .addToUi() } function getImgs(){  const doc = DocumentApp.getActiveDocument();  const body = doc.getBody();  const images = body.getImages();  const id = ‘1mW6Yh2X4wU8A-vQs1Z2RRVHIfHD_SI3u’;  const … Read more

Add Date into Google Doc at cursor Google Apps Script Lesson with Source Code

Add Date into Google Doc at cursor Document Apps Script Example function onOpen() {  const ui = DocumentApp.getUi();  ui.createMenu(‘Adv’)  .addItem(‘Add Date’,’adder’)  .addToUi() } function adder(){  const doc = DocumentApp.getActiveDocument();  const cur = doc.getCursor();  if(cur){    const val = new Date();    const temp = Utilities.formatDate(val,”GMT”, “yyyy-MM-dd”)    const ele = cur.insertText(temp);  } }

How to Check for overlap Between Two Page elements Colission Detection

Check out the Collision Interactive at Commonly in Games when page elements are moving, there needs to be a way to check if overlap has occurred. There is a formula that can be used which checks the x,y position of each element, as well needs the width and height of the element. X-Horizontal check formula … Read more

WP Twitter Auto Publish Powered By :