Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

How to add text to Google Docs with VBscript?

$
0
0

I searched everywhere, but I could not find a close solution. I want to send (write) text to my Google Document with VBscript (script.vbs) code from my computer. Please offer a solution. With lua code, I can read the text in the document and see it on my computer on the desktop. But I can't send text. Below is a close, sample code. Can you help this code editing? Thanks in advance for the help.

// Open a document by URL.
var doc = DocumentApp.openByUrl('https://docs.google.com/document/d/1cvHv3L14MjqTQavpnUVRkvDf6z4_Ss5_y60F7xj__mw/edit');
var body = DocumentApp.getActiveDocument().getBody();

var text = body.editAsText();

text.insertText(0, 'Inserted text.\n');

text.appendText('\nAppended text.');

Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>