4D v16

WP Import document

Home

 
4D v16
WP Import document

WP Import document 


 

WP Import document ( filePath ) -> Function result 
Parameter Type   Description
filePath  String in Path to a 4D Write document (.4w7 or .4wt)
or a 4D Write Pro document (.4wp)
Function result  Object in 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:

  • former 4D Write documents (.4w7 or .4wt). For a detailed list of 4D Write features that are currently supported in 4D Write Pro objects, please refer to the Importing 4D Write documents section.
  • 4D Write Pro (.4wp) format documents. For more information about the 4D Write Pro document format, refer to .4wp document format.

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.

After execution, the command returns the 4D Write Pro object resulting from this conversion.

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.

Example  

 C_OBJECT(WPDoc)
 WPDoc:=WP Import document("C:\\documents\\4DWriteDocs\\Letter.4w7")



See also 

WP New

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v14 R5
Modified: 4D v15 R2

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v16)