If you just use export, then you will need to be using elements that are bound. You can create a bound LE and store the value of the variable in that element. Then include the element in the export.
If you use File I/O to write your export file then you can include variables. Define the file to write to. Build the string to be written to the file, and use I/O to write to the file.
The Merge document does not care how the merge data file was created. It does not know that the delimited data came from an LE or written using variable.
===================================
Here is an excerpt that is based on code provided by Tom Marcellus in an issue of Inside Sesame:
Quote:while vLoop <= vCount {
vHeader += "EventDate" + vLoop + "^"
+ "Event" + vLoop + "^"
+ "Fee" + vLoop + "^"
+ "CEU" + vLoop + "^"
+ "RunningTotal" + vLoop + "^"
+ "CPEYears" + vLoop + "^"
//Note: DO NOT USE "tblName!" in front of "frmName" - No data will result
vData += @FormFieldValue("sfrmEvents", "EventDate", vLoop) + "^"
+ @FormFieldValue("sfrmEvents", "Event", vLoop) + "^"
+ @ToNumber(@FormFieldValue("sfrmEvents", "Fee", vLoop)) + "^"
+ @ToNumber(@FormFieldValue("sfrmEvents", "CEU", vLoop)) + "^"
+ @ToNumber(@FormFieldValue("sfrmEvents", "RunningTotal", vLoop)) + "^"
+ @FormFieldValue("sfrmEvents", "CPEYears", vLoop) + "^"
vLoop += 1
}
// Using "^" as a field delimiter, using EOL as record separator.
FOR n = vLoop to vMaxEvents
vHeader += "EventDate" + n + "^"
+ "Event" + n + "^"
+ "Fee" + n + "^"
+ "CEU" + n + "^"
+ "RunningTotal" + n + "^"
+ "CPEYears" + n + "^"
vData += "^^^^^^^"
NEXT
// Write header & data lines to the export merge data source file
vFileHandle = fileOpen(vDataPath)
fileSeek(vFileHandle, 0)
fileWriteLn(vFileHandle, vHeader + @NewLine() + vData)
fileClose(vFileHandle)
End SubRoutine
//========================================================
Note that the fileWrite command is only sending out variables. The LE values have been combined into varialbe vHeader and vData. In the FOR and WHILE loops that the variables "vLoop" and "n" are appended to the name of the LE when creating the header lines. And where the values of the LEs are used, variables could be used there also and/or in addition to the LEs
.