Intenta con este pequeño cambio...
Código Delphi
[-]var Archivo: string;
errorcode: integer;
begin
Archivo:=cxTextEdit6.Text;
If Not FileExists(Archivo) Then Exit;
errorcode :=
ShellExecute(0, 'open', PWideChar(Archivo), nil, nil, SW_NORMAL);
case errorcode of
2:showmessage('file not found');
3:showmessage('path not found');
5:showmessage('access denied');
8:showmessage('not enough memory');
32:showmessage('dynamic-link library not found');
26:showmessage('sharing violation');
27:showmessage('filename association incomplete or invalid');
28:showmessage('DDE request timed out');
29:showmessage('DDE transaction failed');
30:showmessage('DDE busy');
31:showmessage('no application associated with the given filename extension');
end;
end;
Saludos