Domino Code Fragment

Code Name*
Running @Command on Multiple Documents
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.139.90.131
Description*
The @Command function can only be run on one document at a time (i.e., You cannot select two or more documents that Compose a document for each of them). In order to use this command on multiple documents, follow these procedures:
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Compose Special Mails

String := @Environment("SpecialMail");
@If(!@Contains(String; IDName); @Do(@Environment("SpecialMail"; String + ";" + IDName); @Command([ToolsRunMacro]; "(Compose Special Mails2)")); @Command([ToolsRunMacro]; "(Compose Special Mails3)"));
SELECT @All

where IDName is a field with a unique field in each of the documents you want to key a mailsend.

Compose Special Mails2

@Command([Compose]; ""; "Special Mail");
@Command([MailSend]);
@Command([FileSave]);
@Command([FileCloseWindow]);
@Command([NavigateNextSelected]);
@Command([ToolsRunMacro]; "Compose Special Mails");
SELECT @All

where Special Mail is a mail-enabled form that inherits all its default values (SendTo, Subject, Body).

Compose Special Mails3

ENVIRONMENT SpecialMail := @DeleteField;
SELECT @All

Then just run the first macro and hit the return key as many times as necessary to indicate for each piece of mail that you want to send it un