Nicely done! & Helpful !
DDEExecute(iconn,doit) [(connection, command)] is an "Execute" statement, which does not ask for a return value.
DDERequest uses 'atoms' to send data TO ecco, which are limited to 256 characters, so you use a DDEExecute which uses a shared memory string to send much larger (up to 24 or 32k depending.. on what ecco will handle) data.
but Execute is not made/intended to RETURN information... other than a few bytes...
so Ecco was designed to allow you a "Request" to use in conjunction with the execute...
ie.
Quote:' the next odd thing is that you get nothing back when sending a large string
newid=DDEExecute(iconn,doit) 'Newid here shows up as blank (timing issues?)
newid=DDERequest(iconn,"GetLastResult") ' But prodding again gets a valid newid value
' which lets us move the newly inserted item under the parent ("d" is the flag for "daughter")
DDEExecute(iconn, "InsertItem,"& str(rootid)& ",d," &str(newid))
is because Execute does not *ever* send back any ecco id#,
"GetLastResult" is intended to be used
exactly as you have used it!, in partner with an execute command.
ps: (for others) same basic structure of DDE commands to Ecco works from within Word or Excel.....