最近因公司群發郵件程式需要給注冊一段時間沒有激活的用戶發激活郵件
uses Variants
procedure TForm
var
SharpObject: Variant;
TestValue: string;
begin
try
try
SharpObject := CreateOleObject(
TestValue := SharpObject
Edit
except
on e: exception do
begin
ShowMessage(e
end;
end;
finally
SharpObject := Unassigned;
end;
end;
procedure TForm
var
SharpObject: Variant;
TestValue: string;
begin
try
try
SharpObject := CreateOleObject(
TestValue := SharpObject
Edit
except
on e: exception do
begin
ShowMessage(e
end;
end;
finally
SharpObject := Unassigned;
end;
end;
initialization
CoInitialize(nil);
finalization
CoUninitialize;
end
From:http://tw.wingwit.com/Article/program/Delphi/201311/24858.html