Can someone help me determine why Alpha Five crashes at the following line in the script.
param_message = a5_mailmerge(em.message_body_temp,form_name)
param_message = a5_mailmerge(em.message_body_temp,form_name)
Code:
'Date Created: 22-May-2011 11:25:33 PM 'Last Updated: 22-May-2011 11:40:00 PM 'Created By : David 'Updated By : David 'Send an e- mail message using the default external e-mail clilent. IF is_object(topparent.this) THEN form_name = topparent.name()+".this" ELSE form_name = "" END IF template_text = get_from_file("C:\My Data\All Databases\MDC Database\Pre-authorized notice.txt") DIM em as P DIM param_to as C DIM param_subject as C DIM param_cc as C DIM param_bcc as C DIM message_type as C 'A5_email_parser() parses out the different sections of the e-mail template em = a5_email_parser(template_text) 'The template may have stored expressions rather than constant values for the address components. 'Expressions will be prefixed with '='. 'a5_eval_expression() will evaluate any expressions that are prefixed with '=' in the context of the current form. param_to = alltrim(a5_eval_expression(em.send_to_temp,local_variables())) param_subject = alltrim(a5_eval_expression(em.subject_temp,local_variables())) param_cc = alltrim(a5_eval_expression(em.cc_temp,local_variables())) param_bcc = alltrim(a5_eval_expression(em.bcc_temp,local_variables())) message_type = em.style 'Template message may have mail merge commands. a5_mailmerge() evaluates the mail merge commands. param_message = a5_mailmerge(em.message_body_temp,form_name) ' ''Evaluate any mail-merge commands in the message body. param_message = a5_mailmerge(param_message,form_name) 'Send the e-mail using the external e-mail client email_client_external(param_to,param_subject,param_message,param_cc,param_bcc)
Comment