Hi again -
Is anyone there? I feel like I am having a one-sided converstion. lol
I am hoping that if I present some code, someone will come up with an "alternative" for me. The following code works BUT I have to wait too long for Word to close (and, probably NOT long enough if I take too much time in MS Word).
var n as int
Clear(Mark)
If @isblank(Mark)
{
Mark = "DOIT"
n = @AsynchShell("C:\Sesame\data\email.doc")
}
loiter(30000)
if MARK = "DOIT"
{
LastEMail = @insert("C:\sesame\data\email.doc")
Clear(Mark)
}
Please don't worry about my using a layout element instead of a variable. I used the element on purpose to see what was in the "Mark" LE at any point in time. WHEN (not "IF" but "WHEN") I get it working, I will use a variable instead of the layout element. As I said, this works just fine but with a long delay.
If I OMIT the @loiter command, then what gets inserted is the PREVIOUSLY saved document; it does not reflect the most recent one saved.
In this situation (with @loiter ommited) then if I execute the command button a SECOND time it does enter the correct document but only after shelling out to MS Word first.
If I could get this close, it just seems to me that there MUST be a way to make it work.
Once again, here is my objective and I want this to work with one click on a Sesame command button:
1) Click on a command button in Sesame
2) Have MS Word automatically open and present me with email.doc
3) Modify and save my email doc.
3) Exit Word which will return me to Sesame
4) Have Sesame insert the e-mail doc
PLEASE tell me I'm on the right track and what it is that I am overlooking. I must get on with my "other" (@isblank(Sesame) life. lol