var positionedImages = getPositionedImages() įor (var i=0 idoc = DocumentApp.getActiveDocument() Here's an example of a PositionedImage inserted by the following script: You could emulate that via script if necessary.) Insert a PositionedImage (When you switch an image from "Wrap text" to "Inline" using the UI, the PositionedImage is removed from its anchor paragraph, then inserted into the body of the document outside of that paragraph. This implies that you cannot convert one type of image directly to the other. Get the string representing the given PositionedLayout enum. They behave a little differently than InlineImage elements, as they need to be anchored to a ListItem or Paragraph element, while InlineImages can be added only to Body, FooterSection, HeaderSection or TableCell elements.Ī PositionedImage is an object anchored in an element, while an InlineImage is itself an element of a document. Here's how you can set the layout of a PositionedImage so that it is wrapped by text: tLayout ( ) The following utility function gets the English equivalent of a PositionedLayout enum. As of December 2015, Google Apps Script can manipulate PositionedImage objects in Google Docs.
0 Comments
Leave a Reply. |