4D v16WP INSERT DOCUMENT |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16
WP INSERT DOCUMENT
WP INSERT DOCUMENT
The WP INSERT DOCUMENT command inserts the wpDoc document in the rangeObj range according to the specified insertion mode and rangeUpdate parameter. In rangeObj, pass a valid 4D Write Pro standard range object. A rangeObj is a part of a 4D Write Pro document; it can be created using the , WP Get bookmark range or WP Get range commands. The inserted wpDoc document can be any 4D Write Pro document object created using the WP New or WP Import document command. Only the body children elements are inserted (sections and bookmarks in the destination range are preserved). In addition, the elements are copied, so wpDoc can be re-used several times. In the mode parameter, pass one or a combination of the following constants from the 4D Write Pro Constants theme to indicate the insertion mode to be used for the document in the destination rangeObj range:
You can combine one of the previous constants with the following insertion options:
In the optional rangeUpdate parameter, you can pass one of the following constants to specify whether or not the inserted contents are included in the resulting range:
Note: If you do not pass a rangeUpdate parameter, by default the inserted contents are included in the resulting range. You want to replace the contents of a document by the text selected in another one: $tempRange:=WP Get selection(WPTemplate) //we retrieve the user selection in the WPTemplate document You have defined a template document with different preformatted parts, each of them being stored as a bookmark. When producing a final document from the template, you can extract any bookmark as a new document and insert it in the final document. ARRAY TEXT($_BookmarkNames;0)
See also
Download HDI database
|
PROPERTIES
Product: 4D HISTORY
ARTICLE USAGE
4D Write Pro Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||