4D Write v16WR SAVE DOCUMENT |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Write v16
WR SAVE DOCUMENT
WR SAVE DOCUMENT
The WR SAVE DOCUMENT command saves the document located in the 4D Write area referenced by area, using the pathname passed in document. document is the name or the complete pathname of the document file. On Windows, you must include the file extension, in order to determine the file type.
If document contains only the name of the file, WR SAVE DOCUMENT will save the document in the folder of the database's structure file. If document is an empty string, WR SAVE DOCUMENT displays the standard Save file dialog box. When the Save (Mac OS) or OK (Windows) button of the Save file dialog box is clicked, the OK system variable is set to 1, and the document variable will be assigned the complete pathname of the file the user selects. In this case, the type parameter returns the type selected by the user in the type drop-down list, or the document type if no type was selected by the user. If the user clicks the Cancel button, document returns an empty string and the OK system variable is set to 0. File formats can be selected from the Type drop-down list (on Windows) or from the type pop-up menu in the Save file dialog box. By default, the document is saved in 4D Write format. If you want to specify a different type, you need to pass the desired file type in the type parameter. A type consists of a 4-character string. You can use one of the following constants, found in the "WR Document types" theme:
Notes:
Compatibility note: To retain compatibility with previous versions, the DOC8 (Word 8 Document) type is also supported. The type parameter is used for the document encoding only. It corresponds neither to a Mac OS file type, nor to a Windows extension.
The file extension is defined according to the type parameter value, even if the name already has an extension. For example, if you pass "Report.RTF" in the document parameter and "HTML" in type, the file will be named "Report.HTM".
You want to save the document named 'LetterClient' in the 4D Write file format. This document will be saved into the "WriteDocuments" folder located at the same level as the database’s structure file: `Getting the full pathname to the database structure file You want to give the user the ability to choose both the name and type of the document to save. Then, you want to retrieve the chosen values: DocName:=""
See also
|
PROPERTIES
Product: 4D Write HISTORY
Modified: 4D Write v11 ARTICLE USAGE
4D Write Language ( 4D Write v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||