Hi Marco,
If you reference a dll in your project .net creates an Interop wrapper that
lets you interact with it.
regarding Office you reference the Office PIAs (Primary Interop Assemblies)
these can be downloaded from Microsoft.
I have had a quick play but haven't done anything substantial.
Play code follows:
hth
Bob
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Outlook = Microsoft.Office.Interop.Outlook;
namespace TestOutLookPIA
{
public partial class Form1 : Form
{
private Outlook.Application outlook;
public Form1()
{
InitializeComponent();
outlook = new Outlook.ApplicationClass();
outlook.GetNamespace("MAPI");
Outlook.MailItem myMail;
myMail=(Outlook.MailItem)outlook.CreateItem(Micros oft.Office.Interop.Outlook.OlItemType.olMailItem);
myMail.Recipients.Add(my*******@mydomain.com);
myMail.Body = "Test Message";
myMail.Subject = "Test Mail";
myMail.Send();
}
}
}
"Marco Shaw" <marcoDOTshaw_@_gmailDOTcomwrote in message
news:u9*************@TK2MSFTNGP03.phx.gbl...
**Programming newbie**
I'd like to write some C# that interacts with a COM object ("automation
library"?). I don't quite know what to look for though to find examples.
I'm guessing if I can find some demos of C# using COM objects like that
from MS Office, that might get me started?
Marco