Below is a procedure that gathers all the contacts email address and puts them into a new email window of Outlook. The procedure works fin but the companies Outlook is set so that the user is only allowed to enter 99 email address per email window. I am struggling to come up with a procedure that adds the first 99 email address to a new email window, then adds the next 99 email address to a second email window and so on. Any help with this is must appreciated.
uses ShellApi;
Var
em_mail, eadd : string;
BEGIN
Reset(VolFile);
Seek(VolFile, 0);
read(VolFile, VolRec);
if VolRec.vemail = '' then
else
eadd := VolRec.vfname + ' ' + VolRec.vlname + ' <' + VolRec.vemail + '>;';
while NOT EOF(VolFile) do begin
read(VolFile, VolRec);
if VolRec.vemail = '' then
else
eadd := eadd + VolRec.vfname + ' ' + VolRec.vlname + ' <' + VolRec.vemail + '>;';
end;
em_mail := 'mailto:' + eadd;
ShellExecute(Handle,'open',PChar(em_mail), nil, nil, SW_SHOWNORMAL) ;