VasquezPL 0 Junior Poster

I have a big problem.
Wheb I try to automate Outlook, I need to make a wrapper...My outlook version is 14.
Unfortunatelly I need my proggy to work on all versions of Outlook.
how to do that?

My code to send email is:

string allbody;
            Outlook._Application oApp = new Outlook.Application();

            //Create the new message by using the simplest approach.
            Outlook._MailItem oMsg = (Outlook._MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);

            //Add a recipient.
            // TODO: Change the following recipient where appropriate.
            Outlook.Recipient oRecip = (Outlook.Recipient)oMsg.Recipients.Add(x);

            //Set the basic properties.
            oMsg.Subject = "Conference Room Report - "+CRBox1.Text;
            //Set Body
            "CONFERENCE ROOM : " + CRBox1.Text +
            "\nLOGIN : " + Environment.UserName +
            "\nDATE : " + date1.Text +
            "\nTIME : " + time1.Text;
oMsg.Body = allbody;
            //Send the message.

            // If you want to, display the message.
            //oMsg.Display(true);  //modal

            //Explicitly release objects.
            oRecip = null;
            oMsg = null;
            oApp = null;

is it possible to solve that problem?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.