VB.Net application to add an appointment to Outlook 2003.

I have written a VB.Net application to add specified numbers of Days, Hours, and Minutes to current system date / time then display a result on a label as calculated date and time.

I want to have a new option which will allow a user to type some text into fields (subject / content of the appointment) then click a button "Add to Outlook" (Can this be any versions and not just 2003? If not then 2003 is fine) to add the currently displayed date and time to Outlook 2003 together with appointment's title and content text.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DCreatureAuthor Commented:
Thanks DotNetLover_Baan, however I would appreciate us all making Experts-Exchange a great place for source of knowledge and not just a web site that indexes bunches of links to other sites, which in the future, may or may not exist.

DCreatureAuthor Commented:
Having said that, here is the content found on some of those links:

(These information are from http://www.outlookcode.com).

Description: You can use the Namespace.GetSharedDefaultFolder method to access the Calendar folder in another Exchange mailbox. Keep in mind that you might not have permission to even see that folder, or you might have only read access.

Sub CreateOtherUserAppointment()
    Dim objApp As Outlook.Application
    Dim objNS As Outlook.NameSpace
    Dim objFolder As Outlook.MAPIFolder
    Dim objDummy As Outlook.MailItem
    Dim objRecip As Outlook.Recipient
    Dim objAppt As Outlook.AppointmentItem
    Dim strMsg As String
    Dim strName As String
    On Error Resume Next
    ' ### name of person whose Calendar you want to use ###
    strName = "FlaviusJ"
    Set objApp = CreateObject("Outlook.Application")
    Set objNS = objApp.GetNamespace("MAPI")
    Set objDummy = objApp.CreateItem(olMailItem)
    Set objRecip = objDummy.Recipients.Add(strName)
    If objRecip.Resolved Then
        On Error Resume Next
        Set objFolder = _
          objNS.GetSharedDefaultFolder(objRecip, _
        If Not objFolder Is Nothing Then
            Set objAppt = objFolder.Items.Add
            If Not objAppt Is Nothing Then
                With objAppt
                    .Subject = "Test Appointment"
                    .Start = Date + 14
                    .AllDayEvent = True
                End With
            End If
        End If
        MsgBox "Could not find " & Chr(34) & strName & Chr(34), , _
               "User not found"
    End If

    Set objApp = Nothing
    Set objNS = Nothing
    Set objFolder = Nothing
    Set objDummy = Nothing
    Set objRecip = Nothing
    Set objAppt = Nothing
End Sub


Content of another link:

Code level: intermediate    Code area: Outlook and .NET
Title: Outlook & mapi
Description: this C# code uses OOM and mapi to create an appointment in the current outlook profile

Outlook.Application oApp = new Outlook.ApplicationClass();
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
oNS.Logon("profileName", "Password", false, true);

Outlook.AppointmentItem oAppt = (Outlook.AppointmentItem)oApp.CreateItem(Outlook.OlItemType.olAppointmentItem);
oAppt.Subject = "Created using OOM in C#";
oAppt.Body = "Hello World";
oAppt.Location = "Samm E";
oAppt.Start = Convert.ToDateTime("03/08/2004 9:00:00 AM");
oAppt.End = Convert.ToDateTime("03/08/2004 1:00:00 PM");
oAppt.ReminderSet = true;
oAppt.ReminderMinutesBeforeStart = 5;
oAppt.BusyStatus = Outlook.OlBusyStatus.olBusy;
oAppt.IsOnlineMeeting = false;

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.