Apr 212005
 

Perhaps this category will have obvious solutions or tips, but I’ll share them anyway: C# code snippets. This first one is about logging on to Outlook, which I needed for E-Sync. All samples give you the code with the name of the profile to logon to, or “leave the values for profile and password blank to use the default profile”. The first one means hard-coding a profile, the second one I did not get working on 2 different machines, so I guess it used to be like that but not anymore.

Here’s how to lookup the default profile in the registry, and logon to the MAPI-store.

RegistryKey myKey = Registry.CurrentUser;
myKey = myKey.OpenSubKey("SoftwareMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfiles");
String myProfile = myKey.GetValue("DefaultProfile").ToString();
myMAPISession.Logon(myProfile,"",true,myMV,myMV,myMV,myMV);

Don’t forget to include “using Microsoft.Win32;”.

 Posted by at 21:01
Apr 212005
 

The appointments from the ERP-application come in two flavours. A “real” appointment, with attendees and a real date and time that it occurs. And a “structure” appointment. Only very basicly defined occuring on a certain weekday (Friday, from 9:40 – 10:00 am). The “structure” appointments are filled in later, but they are used by the planning department to see what the employees have designated their timeblocks to.
E-Sync now differentiates between real and structure appointments, also marking the structure appointments as “free”, instead of busy.

What I need to do before the first release is:
– Read attendee information from the database. Their unique number is not informative enough
– Save the entered values for next time E-Sync starts (and don’t show the defaults anymore)
– Make the colors per appointmenttype configurable

The first release is planned for May, 2nd (that’s a Monday). Very exciting.

 Posted by at 01:24