DOTNET (OpenInsight 32-Bit)
At 07 DEC 2010 02:35:45PM Barry Stevens wrote:
I am researching the availability of .net classes to intreact with ms outlook. Finally found one.
The following is a C# example(I assume it is .net) which looks convertible to OI , but I dont know how. Can anyone help.
using Outlook=Microsoft.Office.Interop.Outlook
private void AssignTaskExample()
{
Outlook.TaskItem task=Application.CreateItem(Outlook.OlItemType.olTaskItem) as Outlook.TaskItem;task.Subject=Tax Preparation";task.StartDate=DateTime.Parse("4/1/2007 8:00 AM");task.DueDate=DateTime.Parse("4/15/2007 8:00 AM");Outlook.RecurrencePattern pattern =task.GetRecurrencePattern();pattern.RecurrenceType=Outlook.OlRecurrenceType.olRecursYearly;pattern.PatternStartDate=DateTime.Parse("4/1/2007");pattern.NoEndDate=true;task.ReminderSet=true;task.ReminderTime=DateTime.Parse("4/1/2007 8:00 AM");task.Assign();task.Recipients.Add("accountant@example.com");task.Recipients.ResolveAll();task.Send();}
At 07 DEC 2010 03:11PM Bob Carten wrote:
Not really answering your question, but
]] Microsoft.Office.Interop.Outlook
Interop is dotNet naming convention for .Net wrapper class that calls COM objects. This suggests you can still use OLECreateInstance from OI to drive the underlying COM objects yourself, without .Net
At 07 DEC 2010 09:38PM Barry Stevens wrote:
Ahh, thought COM sounded familiar, but forgot the relationship.
So that answers my question about outlook 2010 - outlook.application will work.
No wonder the C# code looked closer to OLE than .net
Thanks heaps(as usual)
At 08 DEC 2010 02:15AM Colin Rule wrote:
There is reference on the forum that OLE to Outlook is not possible due to changes to Outlook by Microsoft for the ILY virus.
Is this still the case, or are there ways to bypass the lock down and use this.
Colin
At 08 DEC 2010 03:25AM Barry Stevens wrote:
I can in 2007 wich I think that article refered to. I think bob said it, it did appear to be an assumption, not a fact.
I have not come accros anthing that says you cant.
I know some one with 2010, so I will take my test routine and try it.
At 08 DEC 2010 08:31AM Bob Carten wrote:
Hi Colin,
The latest versions of Office are less restrictive than Office 2003.
For example, Outllok 2007 will prevent scanning address books, but will allow creating an email.
see http://msdn.microsoft.com/en-us/library/ms778202.aspx for more details