Export to Outlook

edited December 2017 in FastReport VCL 5
I want to attach a report to an email sent via Outlook without user intervention.
IOW click the 'Send by email' button I want the export dialog box to come up with all values filled in programmatically.
Preferably he should not even see the export dialog window.

The email address is stored in a customer record.
Whatever I try I am unable to get this into the TfrxMailExportDialog window

(A)
aForm.frxMailExport.Address := 'anAddress@isp.com';
aForm.frxMailExport.Subject := 'TEST E-MAILl';
aForm.frxMailExport.UseINIfile := FALSE;

If I set UseINIfile := TRUE then the email address goes into the drop down list of the AddressE combobox but not its text field.

The code below, TfrxMailExport.ShowModal - from frxExportMail.pas just does not seem to do its thing
with TfrxMailExportDialog.Create(nil) do
begin
.......
AddressE.Text := FAddress;
SubjectE.Text := FSubject;
MessageM.Text := FMessage.Text;

I can see in the debugger that FAddress above has the content I assigned under (A)

Anyone see where the problem is?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.