anneoctaaf
Programmer
At the clicked event of a button i've got the following code:
The idea is to open a new window where the user can write some tekst that needs to be put in the mail message. Right now it opens the window w_email, but also continues to execute the rest of the code in this event. While i want PB to wait till the user has entered the text, pushed the button 'ok' in w_email, so that ls_tekst is filled. How can i do this?
Thanx!
OpenWithParm(w_email, li_bon)
//get text for email
ls_tekst = message.StringParm
lms_MAPISession = CREATE mailsession
IF lms_MAPISession.MailLogon() = MailReturnSuccess! THEN
// Mail Session is ok so Populate the Message
lmm_Message.Subject = "My mail"
lmm_Message.NoteText = ls_tekst
lmm_Message.Recipient[ 1 ].Name = 'Jan'
lmm_Message.Recipient[ 2 ].Name = 'Piet'
lmm_Message.Recipient[ 1 ].Address 'Jan@mail.nl'
lmm_Message.Recipient[ 2 ].Address = 'Piet@mail.nl'
IF lms_MAPISession.MailSend( lmm_Message ) = MailReturnSuccess! THEN
Messagebox( 'Email', 'Mail is send.' )
END IF
lms_MAPISession.MailLogoff()
END IF
DESTROY lms_MAPISession
The idea is to open a new window where the user can write some tekst that needs to be put in the mail message. Right now it opens the window w_email, but also continues to execute the rest of the code in this event. While i want PB to wait till the user has entered the text, pushed the button 'ok' in w_email, so that ls_tekst is filled. How can i do this?
Thanx!
OpenWithParm(w_email, li_bon)
//get text for email
ls_tekst = message.StringParm
lms_MAPISession = CREATE mailsession
IF lms_MAPISession.MailLogon() = MailReturnSuccess! THEN
// Mail Session is ok so Populate the Message
lmm_Message.Subject = "My mail"
lmm_Message.NoteText = ls_tekst
lmm_Message.Recipient[ 1 ].Name = 'Jan'
lmm_Message.Recipient[ 2 ].Name = 'Piet'
lmm_Message.Recipient[ 1 ].Address 'Jan@mail.nl'
lmm_Message.Recipient[ 2 ].Address = 'Piet@mail.nl'
IF lms_MAPISession.MailSend( lmm_Message ) = MailReturnSuccess! THEN
Messagebox( 'Email', 'Mail is send.' )
END IF
lms_MAPISession.MailLogoff()
END IF
DESTROY lms_MAPISession