D
dreamyyuan
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TfrmMain.ToolButton12Click(Sender: TObject);
var
outlook,MailItem,Recipient:variant;
OutlookNameSpace: variant;
OutlookFolder: variant;
OutlookAttachment: variant;
begin
outlook:=CreateOleObject('OutLook.application');
except
Outlook :=GetActiveOleObject('Outlook.Application');
end;
OutlookNameSpace :=Outlook.GetNamespace('MAPI');
OutlookFolder:=OutlookNameSpace.GetDefaultFolder(olFolderOutbox);
//此地方的調用路徑是outlook預設的值,如果我想調用備份的路徑,怎麼用程式去實現?
MailItem:=OutlookFolder.Items.Add(olMailItem);
mailitem.display;
end;
var
outlook,MailItem,Recipient:variant;
OutlookNameSpace: variant;
OutlookFolder: variant;
OutlookAttachment: variant;
begin
outlook:=CreateOleObject('OutLook.application');
except
Outlook :=GetActiveOleObject('Outlook.Application');
end;
OutlookNameSpace :=Outlook.GetNamespace('MAPI');
OutlookFolder:=OutlookNameSpace.GetDefaultFolder(olFolderOutbox);
//此地方的調用路徑是outlook預設的值,如果我想調用備份的路徑,怎麼用程式去實現?
MailItem:=OutlookFolder.Items.Add(olMailItem);
mailitem.display;
end;