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 without the original numbering. var source_doc = DocumentApp.getActiveDocument(); var selection = source_doc.getSelection(); if (!selection) { var ui = DocumentApp.getUi(); ui.alert('Please make a selection first.'); return; } var target_doc =