Tech Tip: Proper Way to Insert Documents into WP Tables
PRODUCT: 4D | VERSION: 20 R | PLATFORM: Mac & Win
Published On: July 16, 2025
You cannot pass a full WP document to WP Table append row — headers and footers are not allowed in a table cell.
To insert only the document body, use:
WPdoc:=WP Import document("file.4wp") $cellrange:=WP Table get cells(WPTable; 1; 1) $range1:=WP Insert document body($cellrange; WPdoc; wk replace) |
WP Insert document body is just a renamed version of the old WP INSERT DOCUMENT.
You can control how the content is inserted using the following constants:
- wk replace : Replaces the target content
- wk prepend : Inserts content at the beginning
- wk append : Inserts content at the end