4D v18WP Import document |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v18
WP Import document
|
WP Import document ( filePath {; option} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
filePath | String |
![]() |
Path to a 4D Write document (.4w7 or .4wt) or a 4D Write Pro document (.4wp) |
|||||
option | Longint |
![]() |
Import option for HTML expressions | |||||
Function result | Object |
![]() |
4D Write Pro object | |||||
The WP Import document command converts an existing 4D Write Pro or 4D Write document (.4wp, .4w7 or .4wt) to a new 4D Write Pro object.
In the filePath parameter, pass the path of a document stored on disk. The following types of documents are supported:
You must pass a complete path, unless the document is located at the same level as the structure file, in which case you can just pass its name.
By defaut, HTML expressions inserted in legacy 4D Write documents are not imported (no 4D Write Pro support). If you pass the wk import html expressions as text constant in the option parameter, HTML expressions will be imported as raw text within ##htmlBegin## and ##htmlEnd## tags -- which will require formatting actions afterwards. For example:
##htmlBegin##<span>Imported title<b>bold</b></span>##htmlEnd##
Note: If you want to import a document stored in a 4D BLOB field, you can also consider using the WP New command.
An error is returned if the filePath parameter is invalid, or if the file is missing or the file format is not supported.
C_OBJECT(WPDoc)
WPDoc:=WP Import document("C:\\documents\\4DWriteDocs\\Letter.4w7")
Product: 4D
Theme: 4D Write Pro Language
Number:
1318
Created: 4D v14 R5
Modified: 4D v15 R2
4D Write Pro Reference ( 4D v18)