Google Apps Script: How to remove a link from a document
问题 I'm having trouble to remove a link from a Text element. Calling .setLinkUrl(null) on it seems to work, but makes the document crash! You can see it happening with this tiny google script: function test() { var body = DocumentApp.getActiveDocument().getBody(); var text = body.appendParagraph("link").editAsText(); text.setLinkUrl(null); } Running it then trying to edit the document gives me a "File unavailable" error. Also tried to set remove the link with .setAttributes , but same error. Is