|
Summary
UUencode a file.
Syntax
| Boolean UUencode (Src, Dest) |
Description
To UUencode a file, call the UUencode method with the Src and Dest
parameters set. The Src parameter must be set to source path and filename and Dest
parameter must be set to the destination path and filename. The FileName property must be
set to the name that will be used during encoding. This is necessary to preserve the
original name of the file during the decoding process at the receiving end. The number of
lines in the encoded file is returned in the Lines property after the encoding.
If the Dest parameter is an empty string, then the encoded output is not
generated but the Lines property will contain the number of lines in the encoded file.
This information is necessary while building the header for a uuencoded message.
If an error occurs, then the OnError event will be fired. The application should set a
flag in the OnError event, so that it can determine if the action was successful. In
addition, the application may want to display an error message in the OnError event to
inform the user of the error. Please check the reference page of the OnError event for a
complete listing of error codes.
The UUencode method returns True if successful; otherwise, it returns False. Calling
this method is equivalent to setting the Action property to ACTION_UUENCODE.
Example
Result = Mime.UUencode ("c:tempfile.1",
"c:tempfile.2")
If Result = True Then
MsgBox "Encoded successfully", 64, "Sample Program"
Exit Sub
End If
|