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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
21 views

Failed to found document with an error Request failed for https://docs.google.com returned code 401

I want to download a google docs file as pdf on running apps script script. //Code.gs function run() { const documentId = 'somDocId'; try { // Get the document using document id const doc ...
Rahul Yadav's user avatar
  • 2,707
0 votes
1 answer
41 views

Google app script convert hard wrap to soft wrap for heading 4 in google doc

I am working on a google doc where one heading are spread in multiple lines separated by Enter(\n), I want such to be converted to Soft Return(Shift + Enter), I can do it manually but its very tedious ...
jeev's user avatar
  • 181
0 votes
0 answers
35 views

Google App Scripts, get number of numbered list [duplicate]

I am trying to modify a Google Docs containing a built-in nested numbered list. To do this I need to find the number associated with a particular sentence. For example: (Sorry hard to format this) ...
rhonda.rooster's user avatar
0 votes
0 answers
67 views

create URL that loads website page then scrolls to spot in embedded Google Doc on that page

I have a website (www.hpaspart.com) that serves as a document repository. I need to create a URL that loads a specific website page and then auto-scrolls to spot on that page's embedded Google Doc. ...
Joseph Sanders's user avatar
-1 votes
0 answers
30 views

Get text selection in Google Docs from Chrome Extension manifest version 3

I'm building a Chrome extension that can read text out loud with TTS on any website but I'm having trouble with Google Docs. Normally I would be using: window.getSelection().toString() But that does ...
Jakob Lykke's user avatar
0 votes
0 answers
18 views

How to get document ID or URL without access to DocumentApp?

I have a document in Google Drive which is an uploaded DOCX - because of this I have no access to DocumentApp. I need to find out the document ID, which I know is in the URL, but all the examples of ...
Jan Martin's user avatar
0 votes
3 answers
49 views

Get Document text at a certain position

I want to check if the character before and after the % character is a space. How can I do it using a Text object? I have the paragraph x%y but I want it to be x % y. function checkText() { try { ...
TheWizEd's user avatar
  • 7,805
0 votes
2 answers
63 views

Pulling variables from Google Doc to auto-populate Google Sheet [closed]

Help Needed: So, I am working on a project where I have creative people writing story outlines in Google Docs. That Google Doc gets broken down into variables like "Element Type", "...
Hayley Simpson's user avatar
0 votes
0 answers
16 views

I am experiencing an issue while applying the 'Heading' style to the content pasted from a Word document in CKEditor for Strapi

I want to apply the 'Heading' style of CKEditor to the selected content, which already has inline CSS. I want to retain other formatting for my content. Can anyone help? 'Testing' to be formatted to ...
Sajitha Nagesh Chettiar's user avatar
0 votes
0 answers
30 views

How can I add years of experience to my CV/resumé so that it goes up by 1 every year by itself?

I have a document (a CV) in a Google document. I list years of experience for my core skills. They have been going up every year. I'd like to automate the process so that, every year, the number ...
Asfand Qazi's user avatar
  • 6,636
0 votes
0 answers
28 views

Google Apps Script deployment does not return same value as editor

Problem: When i run the Google Apps Script in the editor, it works fine and returns the selected text from Google Docs. When I test the deployment, or use the Retrieve Text From Google Docs button on ...
S. Jilani's user avatar
0 votes
0 answers
32 views

Generating Google Docs from Google Sheets using Google Apps Script - "Too many changes applied before saving document" error

I'm currently using Google Apps Script to generate Google Docs from a Google Sheet. The data from the Google Sheet is used to populate the generated Google Doc. When I add a few rows to the Google ...
SimoneB's user avatar
  • 168
0 votes
0 answers
38 views

Problem with Docx editor within my web app(seeking high flexibilitty) / Google Docs API getter that returns a position of user's cursor?

I have an app focused on automation of administrative processes. It works thanks to docx templates mapped to some fields inside my db. Example: Mapped document: Dear {client.firstName} {client....
Daniel Klimek's user avatar
0 votes
0 answers
27 views

importarange with a link inside the cell

I need to use an importrange in which references to the range are stored in cells. I tried to find information on the Internet and found this, but it doesn't work. =IMPORTRANGE("...
Enya's user avatar
  • 13
0 votes
1 answer
42 views

How do I use AppScript to replace a tag in a document with the contents of another document?

I have an application where I am building a document from a bunch of template documents based on certain criteria. This works fine except that there are blocks of text that are identical in many of my ...
Tom Sauder's user avatar
0 votes
1 answer
34 views

Highlight all footnote superscripts

I would like a way to highlight all of the superscripts that indicate footnotes, so that it's easier to see the footnote in a paragraph when skimming with your eyes. The goal is something like this: ...
amitrus's user avatar
  • 11
0 votes
1 answer
26 views

React Native app unable to correctly open web links to Google Docs on Android

I'm working on a React Native app which will include links to many different websites. Users should be able to click on the link and be taken to the correct location. However, currently links to ...
Tyla Evans's user avatar
0 votes
0 answers
26 views

onOpen event is being triggered randomly by many fake users

I have a Google Docs Add-on and when the onOpen event happens it registers a new user on our database. The email of those users appears to be faked and autogenerated...e.g. the first names will be the ...
Temp Account's user avatar
0 votes
2 answers
20 views

How to write a Google Apps Script function to find and format a specific character throughout a doc?

I'm using docs to save ASCII drawings for a project, and to make it more readable I need the % character to always be gray. However, manually formatting each % would take forever. I suspect I'll need ...
Jared Evans's user avatar
0 votes
1 answer
56 views

Service Documents failed while accessing document with id xxxx

This script is for creating name badges from a list of names on a spreadsheet. Its takes rows of data from a Google spreadsheet and writes them to a Google Document in a formatted way. When I ran it a ...
Ian Propst-Campbell's user avatar
0 votes
0 answers
56 views

Google.GoogleApiException: The service androidpublisher has thrown an exception. HttpStatusCode is BadRequest. Invalid Value

service.Purchases.Subscriptions.Get(packageName, subscriptionId, purchaseToken); or service.Purchases.Subscriptionsv2.Get(packageName, purchaseToken); generate exceptions every time, for example ...
Blind Freddy's user avatar
1 vote
0 answers
47 views

How to autoformat a dynamic checklist in google docs

I have a large checklist that changes each week in google sheets, and I have automated those changes, but once I get to the stage of using the checklist I have 2 options: (1) Print it out and scratch ...
Danny Linton's user avatar
1 vote
1 answer
57 views

Reading a google doc without user login

I am trying to create a simple webpage that loads text from a google doc I have. The page will only ever read from the doc and will run client side, no server as the page is hosted on github. No need ...
Panthera's user avatar
0 votes
2 answers
318 views

How to query arxiv daily based on keywords and write the results in a Google doc?

I want to find papers that are published in the computer science section of arxiv every day based on a list of keywords and write their titles and arxiv link to my Google doc (i.e., append to the end ...
Penguin's user avatar
  • 1,938
0 votes
0 answers
18 views

Google docs -- how to check for unsaved changes and comments quickly

I am editing a lot of Burundi high school seniors' college essays. So lots of suggested edits and comments. Way too frequently, I try to close the doc and it say I will lose unsaved changes. Most of ...
user5647510's user avatar
0 votes
1 answer
67 views

Insert Image From Drive To Table in Google Document With Apps Script

I have a master document, where I want to change the contents of the document, including replacing certain text with images that I have in Drive. To replace text, there is no problem, but I have ...
PSAB Plalangan's user avatar
0 votes
0 answers
19 views

Google Script not creating PDF from updated copy, using template instead [duplicate]

Im fumbling through a script that fills in Google Docs template, creates a new copy, converts that copy to PDF, then finally deletes the docs copy. I have the steps working that creates, updates, ...
Eli's user avatar
  • 1
1 vote
0 answers
20 views

Issue with Google docs JavaScript code (API)

I have been developing a google docs extension with JavaScript code. Below is the code. // Constants const API_KEY = "MmGPTAPI"; const MODEL_TYPE = "gpt-3.5-turbo"; //chatGPT model ...
pratik's user avatar
  • 11
0 votes
0 answers
43 views

Adding a full width image to Google Doc's footer using Apps Script

I recently watched a YouTube video demonstrating how to create a letterhead by inserting text and images in the header of a Google Docs document using Google Apps Script. I've successfully implemented ...
eArmin's user avatar
  • 325
-1 votes
1 answer
84 views

Bold text in between double-star (**) characters like in Markdown

Hi I have an issue with google docs. The below code is not working for me. What I want to achieve is that I have a text which contains key words which are between **. Those double stars are at the ...
Dummy1234's user avatar
0 votes
0 answers
55 views

How does spelling check extensions like 'Grammarly' and 'LanguageTool' work on a Google Docs page?

As a Chrome extension developer, I am developing an extension like 'Grammarly' and 'LanguageTool'. In a typical webpage rendered through DOM nodes, I can achieve the desired effect by utilizing the ...
eli chin's user avatar
0 votes
2 answers
36 views

Google Script - Google Sheets + Doc

I'm trying to do the following thing: When updating column A in a specific spreadsheet my code on script. google. com should trigger and create a headline (ideally headline 3) in a specific google doc....
Sven Muchow's user avatar
0 votes
1 answer
35 views

Remove text background with google script ( manually done by format > paragraph> borders and shading > reset )

https://docs.google.com/document/d/1VrkXwfR24nIkX9KEGquIqFgkqPAke6MDst_N7YgSOY0/edit?usp=sharing this is a sample doc what i am attempting to do is automize the flow of pressing: format> paragraph&...
Amichai Oron's user avatar
0 votes
1 answer
31 views

Transferring a Google spreadsheet to a Google document

Help me change the script so that the table from Google Sheets transfers the table to Google Docs only those rows and columns where column G has the value true? And how can you put the table in the ...
Владислав Воронин's user avatar
0 votes
0 answers
20 views

Why can't I use the Chinese input method to use the google doc "@" smart box?

When I use the English input method, it works fine to type "@" to call out a smart box, such as a file or document. But when I use Chinese input method, everything changed, it's like a magic ...
楊旻瑾's user avatar
1 vote
1 answer
31 views

Use Google App Script to write a phone number to a doc that allows user to select the whole number with single press

I'm using App Script to create a residents directory (a Google Doc) for our neighborhood. Phone numbers look good but when the user presses on the phone number to select it, only a portion delimited ...
Boof's user avatar
  • 43
0 votes
0 answers
41 views

Set Approval Path and Revisions for a Google Doc through App Script

I have been fumbeling with this for a while, with no luck. I want to create an APpScript for Google Docs where when I select it from a menu item it sets the Approvers for the Document and sets ...
NeilC's user avatar
  • 21
-1 votes
1 answer
41 views

Insert a table from a sheet tab to middle of a doc template

I want to add a table from a Google sheet, Tab "LG001 - Table 1" to a replacement tag of "Table 1" in a doc Template. PS: Thanks so much for your help, I realize there might be ...
Trng L Thanh's user avatar
0 votes
0 answers
46 views

Google apps script: How to make the script update embedded charts in Docs

It's my first time trying out apps script, so bear with me. I'm trying to automate creation of a report from a google sheet/spreadsheet through Google docs and save it as a PDF. Meaning the Docs works ...
ripsraps's user avatar
0 votes
0 answers
20 views

Invalid ID Error when trying to access DocumentProperties

When trying to call the Document Properties, my app returns the error: Invalid ID. Document Properties is only called and accessed in one other section of my application, which was working before I ...
Ryan Rogers's user avatar
0 votes
1 answer
83 views

How to prevent a Google Form from submitting programmatically

I have a Google Form with an attached Google Apps Script and I am doing some advanced form validation in it, stuff that's not possible with Google's built-in validation. Problem is, the response gets ...
T Nguyen's user avatar
  • 3,308
0 votes
1 answer
184 views

How to enable/display a download button in google docs gview embedded in a webview iframe

I have a cordova/ionic app that is successfully embedding office files (IE: pdf, doc, xls) using gview in an iframe. However, the user can only just view the doc and there appears now way for the ...
rolinger's user avatar
  • 2,890
1 vote
0 answers
50 views

Searching embedded Google Document using URL parameters

There is no official documentation for the URL parameters for the Google Doc Viewer. The best related question seems to be this. The syntax for querying is (allegedly) close to SQL, but I cannot for ...
coreymaroney's user avatar
-1 votes
2 answers
29 views

How do I create a google appscript which copies an existing Google Doc then replaces certain text?

Based on the code below I was expecting the AppScript to copy my document, then replace all instances of {{resultID}} with 12345. I am getting an error. function generateReport() { var doc = ...
Zach MacKenzie's user avatar
0 votes
1 answer
79 views

Log when Google Docs text changes

I am experimenting with the end-to-end latency of Google Docs: how long it takes for one user's edits to show up for other users. To measure this, I need a way to detect when the text in a Google Doc ...
lefalaf's user avatar
  • 51
0 votes
1 answer
43 views

The Formula is not working because of dropdowns?

Hi so i am making a planning for a team of 5 and each member have a table to put his availability by chosing from a dropdown if he is available ( dispo ) or not ( Pas Dispo ) or not sure ( Maybe ) and ...
Yacine Katago's user avatar
-1 votes
1 answer
57 views

Apps Script - Find Images between 2 Headings/Bookmarks in Google Doc

I'm creating a script that will copy data from a sample input doc to the sample output doc My sample input doc is a brochure of products, with each product having: A Heading (which is bookmarked) A ...
ElijahM's user avatar
0 votes
1 answer
58 views

cordova iframe to docs.google.com/gview throwing errors and crashing app

In my Cordova app, on certain pages I load a modal that has an iFrame to load/view external docs. It works but it has some issues that I am trying to resolve. The iFrame is ultimately loading a ...
rolinger's user avatar
  • 2,890
0 votes
0 answers
61 views

Python Script adding data to Google Docs via Google Apps Scripts returning 404 : "Error: Requested entity was not found."

I'm trying to create a custom Google Doc template that will auto-populate using some data that was previously scrapped in my python script. I've managed to create the template and scrape the required ...
dan.c's user avatar
  • 1
1 vote
1 answer
25 views

Insert Pagebreak into a google Doc to inplace of findText()

I am trying to insert a page break at a specific line of text. This is what I have: function replaceTextwithPageBreak(body, text){ var searchText = body.findText(text); var textEl = searchText....
Matty Fenny's user avatar

1
2 3 4 5
72