调用outlook发送会议通知,请帮忙看下代码问题出在哪里? ( 积分: 50 )

  • 主题发起人 主题发起人 hnlg81004
  • 开始时间 开始时间
H

hnlg81004

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
const
olAppointmentItem = $00000001;
var
Outlook: Variant;
vAppointmentItem: variant;
begin
try
Outlook := GetActiveOleObject( 'Outlook.Application');
except
Outlook := CreateOleObject( 'Outlook.Application');
end;
vAppointmentItem := Outlook.CreateItem(olAppointmentItem);
vAppointmentItem.Recipients.Add( 'yyh521524@sohu.com');
vAppointmentItem.Subject := '通过Delphi发送约会';;
vAppointmentItem.Body := '通过Delphi发送约会';
vAppointmentItem.Importance := $00000002;
vAppointmentItem.Duration := $00000001;
vAppointmentItem.Location := 'aaaaa ';
vAppointmentItem.ReminderMinutesBeforeStart := $00000001;
vAppointmentItem.Start := Now;//StrToDate( '2007-03-01 9:08 ');
vAppointmentItem.Duration := Now;//StrToDate( '2007-03-05 21:17 ');
vAppointmentItem.NetMeetingAutoStart := 1;
vAppointmentItem.ReminderMinutesBeforeStart := 13;
vAppointmentItem.BusyStatus := olOutOfOffice;
vAppointmentItem.MeetingStatus := 1;
vAppointmentItem.Sensitivity := olNormal;
vAppointmentItem.Send;
VarClear(Outlook);
end;
 
不会吧,真的没有人用过吗?
 
后退
顶部