檢索默認的Outlook電子郵件帳戶只是試圖用我的方式使用Redemption;我有下面的代碼檢索從默認的配置文件的RDOAccounts(電子郵件帳戶):使用Redemption
Profiles profiles = (Profiles)Activator.CreateInstance(Type.GetTypeFromProgID("ProfMan.Profiles"));
Profile defaultProfile = profiles.DefaultProfile;
//open a RDOSession for this profile
RDOSession session = RedemptionLoader.new_RDOSession();
session.Logon(defaultProfile.Name);
RDOAccounts accounts = session.Accounts;
如果我堅持正試圖確定哪個RDOAccount對象被設置爲默認的電子郵件帳戶 - 有似乎不是我可以用來查看它是否爲默認對象的任何屬性。
以前有人做過這個嗎?
ah okay cool - 那麼RDOAccounts.GetOrder的第一個賬戶將是默認的賬戶? – 2012-03-20 06:45:45
這是正確的。 – 2012-03-21 06:46:39
GetOrder似乎在Office 2013中不起作用。我已用兩個Office 365帳戶對其進行了測試,並在Outlook中更改了Store order,但Redemption始終返回相同的帳戶。 – 2013-06-24 11:35:22