I'm using the ItemAttachmentAdd attaching a document reference to a mail
being composed. This has been working for years since GW5.0. In GW7
nothing happens.

Doing something like this (Delphi, late binding):

procedure AttachDocRef(gwTok, docRef: OleVariant)
var
s: string
begin
gwTok.Execute(Format('ItemAttachmentAdd("X00";115; "%s")',
[string(deocRef.MessageId)]), s);
end;

Does anybody know what I have to do

Best regards
Helge