Ik heb van de site van microsoft de volgende handleiding:
http://msdn.microsoft.com...chart/html/ol03csharp.asp
Deze code staat in mijn project.
public enum OlItemType
{
olAppointmentItem = 1;
olContactItem = 2;
olDistributionListItem = 7;
olJournalItem = 4;
olMailItem = 0;
olNoteItem = 5;
olPostItem = 6;
olTaskItem = 3;
}
public static void Main()
{
// Create an Outlook Application object.
Application outLookApp = new Application();
// Create a new TaskItem.
TaskItem newTask =
(TaskItem)outLookApp.CreateItem(OlItemType.olTaskItem);
// Configure the task at hand and save it.
newTask.Body = "Don't forget to send DOM the links...";
newTask.DueDate = DateTime.Now;
newTask.Importance = OlImportance.olImportanceHigh;
newTask.Subject = "Get DOM to stop bugging me.";
newTask.Save();
}
Ik krijg dan alleen de volgende foutmelding, waar ik niet uitkom.
D:\Mijn documenten\Visual Studio Projects\Syn_outlook_ors\OutlookSync\Form1.cs(90): 'System.Windows.Forms.Application.Application()' is inaccessible due to its protection level
Ik ben trouwens nog een beginnen dus tips zijn welkom van C#. Ik moet een applicatie maken die de kalender van outlook exporteert naar een andere server waar een soort agenda op draait
Groetjes
http://msdn.microsoft.com...chart/html/ol03csharp.asp
Deze code staat in mijn project.
public enum OlItemType
{
olAppointmentItem = 1;
olContactItem = 2;
olDistributionListItem = 7;
olJournalItem = 4;
olMailItem = 0;
olNoteItem = 5;
olPostItem = 6;
olTaskItem = 3;
}
public static void Main()
{
// Create an Outlook Application object.
Application outLookApp = new Application();
// Create a new TaskItem.
TaskItem newTask =
(TaskItem)outLookApp.CreateItem(OlItemType.olTaskItem);
// Configure the task at hand and save it.
newTask.Body = "Don't forget to send DOM the links...";
newTask.DueDate = DateTime.Now;
newTask.Importance = OlImportance.olImportanceHigh;
newTask.Subject = "Get DOM to stop bugging me.";
newTask.Save();
}
Ik krijg dan alleen de volgende foutmelding, waar ik niet uitkom.
D:\Mijn documenten\Visual Studio Projects\Syn_outlook_ors\OutlookSync\Form1.cs(90): 'System.Windows.Forms.Application.Application()' is inaccessible due to its protection level
Ik ben trouwens nog een beginnen dus tips zijn welkom van C#. Ik moet een applicatie maken die de kalender van outlook exporteert naar een andere server waar een soort agenda op draait
Groetjes