Questions tagged [google-docs]

Questions related to interacting with Google word processing Documents programmatically. Usage questions about the web application should be posted at Web Applications Stack Exchange.

Google Docs is a cloud-based application and service for creating and collaborating on word processing documents. The service supports an internal API for Google Apps Script as well as an External API.

Usage questions about the web application should be posted at Web Applications Stack Exchange or the Google Drive Help Center instead of here.

Note: Google has historically used the brand "Google Docs" to encompass a suite of products, but since conforming to that would introduce ambiguity here, the tag is specifically for word processing documents while refers to the suite.

3539 questions
1
vote
0 answers

export_media from Google Drive API don't write newlines

When I try to export the text from a Google Docs using the export_media method, the result is a bloc of text (correct at least) but without newlines. For exemple, if my file contains Test And another test The display will looks like Test And…
Kariamoss
  • 542
  • 1
  • 9
  • 29
1
vote
1 answer

Force asking permission with Apps Script?

I'm developing an Apps Script that has a sidebar and a dialog, each need differing levels of permissions to ask the user to be granted. The application needs access to Read/Write the user's Google Drive API, Google Picker, access to Web Cam and…
1
vote
4 answers

setAttributes does not apply foreground color, but bold and other formatting is retained

I want to replace a word "allowance" with "Some text", after running the code, It will remove word allowance and apply "Some text" with same formatting as that of "allowance" but foreground color property is not getting set as that of original.I…
user3436029
  • 75
  • 1
  • 2
  • 13
1
vote
1 answer

How to make a closed search in Google Docs?

I have a document where I need to find a text or word, each time i run a function the selection has to go to next if a word or text is found. If it is at the end it should take me to top in a circular way just like find option in notepad. Is there a…
user3436029
  • 75
  • 1
  • 2
  • 13
1
vote
0 answers

Open Google Sheets Document in new tab from URL

In my application I have the ability to upload an Excel spreadsheet so on top of adding a downloadable template, I also have a link to a shared Google Sheet where the user can use this as an option. The issue is that when I have the sharable link on…
jdgray
  • 1,863
  • 1
  • 11
  • 19
1
vote
2 answers

Getting image from Google User Content

I am preparing a workflow application where I need to get the images hosted on Google Docs. Such…
user552828
  • 769
  • 1
  • 8
  • 17
1
vote
1 answer

How to Add a file to Google Drive via Docs Add On using App Script?

Here is my scenario. I've created an Add-On for Google Docs that acts as a video toolbox. A feature I'm trying to add is the ability to record a video using the built in web cam (using videojs-recorder) and then link to that video within the doc.…
1
vote
1 answer

Google Apps Script - remove spaces using .replace method

I'm trying to replace multiple whitespaces with single ones in a Google Doc with a script. But unfortunately the provided solution to this question isn't working for me. As you can see, I tried several alternatives but can not figure out how to do…
SebastianB
  • 95
  • 1
  • 8
1
vote
0 answers

How to source data from a web-based shared code editor in R

I am interested in directly reading (sourcing) R scripts from a multi-user web-based codesharing site. I have not found any sites which store code in a format that is accessible to R (which may very well be due to my ignorance). I have tried a…
user6135514
  • 135
  • 9
1
vote
0 answers

Google docs offline allocates more than 10GB of HTML5 persistent storage

When I try to allocate more than 10GB of HTML5 persistent storage using Quota Management API, it restricts the storage limit to 10 GB only. Already reported as a Bug Google provides the docs offline feature using HTML5 offline storage's that…
1
vote
2 answers

How to copy ListItems from one Google Document to another while preserving numbering?

The accepted answer to How to copy content and formatting between Google Docs? indicates that we have to add conditional code just to copy elements. But I cannot get it to work for ListItem types, because the target document shows the list items…
bgoodr
  • 2,744
  • 1
  • 30
  • 51
1
vote
0 answers

Drag and drop image onto Google Doc in IFRAME sandbox mode

I'm working on a plugin where we rely on the user's ability to drag-and-drop an image from our Google Docs plugin sidebar to their current Google Document, inserting it in the document when they drop. This has worked fine up till now using…
renderf0x
  • 179
  • 6
1
vote
0 answers

Woopse No preview available google doc

I am using google doc link for showing pdf in android app.But for few files a message appear "Woops no preview aviable". I uploaded same file on dropbox and use that link its working fine. What could be the issue
Erum Awan
  • 21
  • 1
  • 8
1
vote
1 answer

Google Script: interacting with footnotes

I'm (very) new to google script (and javascript) and I'm trying to write a script to modify the font size of the footnotes in my document. Unfortunately, there is very little guidance that I can find for interacting with footnotes in a document. So…
DavidR
  • 359
  • 1
  • 4
  • 15
1
vote
1 answer

Lock script execution on a document when script is deployed as web app

My Google Apps Script is deployed as web app and can be accessed by any user. Its functionality is to open and change the text in that document. I send the script a document ID as a query parameters like…
m5khan
  • 2,667
  • 1
  • 27
  • 37