WriteField()

Syntax:

WriteField( String, Quote, Encrypt, Key )

Parameters:

String – a string containing the text you want to write to the File object. The string must be surrounded by quote marks. This parameter is required.

Quote – surround the String with quotation marks. Quote is either true or false. If Quote is false, the string is not surrounded by quote marks. If Quote is true, the string is surrounded by quote marks. This parameter is optional and the default is true.

Encrypt – set the encryption on or off. Encrypt is either true or false. If Encrypt is true, the file is encrypted. If Encrypt is false, the file is not encrypted. This parameter is optional and the default is false. Note that if encryption is used the content will always be surrounded by quotes. The Quote parameter should be included but will be ignored.

Key – a string that is the encryption key. The string must be surrounded by quotation marks unless you want the key to be taken from the content of a variable with that name. This parameter is optional.

Remarks:

This function will append the contents of the string to the end of the file that has been opened with an OpenFile function. When the string is entered in the file, the string is prefixed with a comma and the string is optionally surrounded by quote marks e.g. ,"new string". Normally, this function is used when adding data to a comma separated file.

image\Script_Button.jpgExamples