// If it's a Confidential Document, save it and send warning message
if (bConfDoc)
then
with SaveToFile
.input=original.document
.Path="c:\ebc.txt"
.AppendTimestamp=TRUE
.Overwrite=FALSE
.SaveUserData=FALSE
.Go()
endwith
with EmailSMTP
.Server="mail.server.com"
.To= Submitter
.From="mailcheck@abcxyz.com"
.Subject="Invalid Email Rejected"
.Message="Cannot email a confidential document"
.CharacterSet=LDD_SMTPCHARSET_US
.Go()
endwith
else
with EmailSMTP
.Server="mail.server.com"
.To="Receiver@abcxyz.com"
.From=Submitter
.Subject="Scanned Document"
.Message="Here is the document you requested"
.CharacterSet=LDD_SMTPCHARSET_US
.Attachments=original.document
.Go()
endwith
endif
Summary
You have now seen how to create more complex scripts by implementing flow control. You can execute
statements conditionally using If/Then/Else or Switch/Case statements. You can repeat blocks of code
using Loop and Repeat Until statements.
You are now ready to learn how to prompt the end user for information when the document is
submitted.
54
Need help?
Do you have a question about the Document Distributor and is the answer not in the manual?
Questions and answers