By making a calendar control
application for Visual Basic, you can have more flexibility in how the
calendar works. The calendar will have the look and functionality of a
typical Outlook calendar, but customized to your own specifications. In
addition to creating reminders and scheduling appointments you can also
import and export unread messages from your Outlook Inbox. The more
experienced you are at using and writing code, the more you can modify
the program with additional tabs and particulars that meet your needs.
Instructions
Things You'll Need
- Computer
- Microsoft Visual Basic 2003
- Microsoft Outlook
-
-
1
Turn on your computer and start Microsoft Visual Studio.NET. Click on the “File” menu, click “New,” and then click “Project.”
-
2
Select and click on “Visual Basic Projects” under “Project Types,” and then click “Console Application” under “Templates.” This will create a default template which will be named “Module1.vb.”
-
3
Add a reference to the "Microsoft Outlook 11.0 Object Library" so you remember your project in case you cannot complete it in one sitting. Select the “Project” menu and click “Add Reference.”
-
4
Scroll to the “COM” tab, click on “Microsoft Outlook 11.0 Object Library” and then click “Select.” Click “OK” in the “Add References” dialog box to accept your selections. If the software prompts you to generate wrappers for the library you selected, click “Yes.”
-
5
Move your mouse to the “Code” window. Delete existing codes. Copy and paste the code in Step 6 and paste it in the “Code” window.
-
6
Imports System.Reflection
Imports Outlook = Microsoft.Office.Interop.Outlook
Module Module1
Sub Main()
' Create an Outlook application.
Dim oApp As Outlook.Application = New Outlook.Application()
' Create a new AppointmentItem.
Dim oAppt As Outlook.AppointmentItem = oApp.CreateItem(Outlook.OlItemType.olAppointmentItem)
' Set some common properties.
oAppt.Subject = "Created using OOM in VB .NET"
oAppt.Body = "Hello World"
oAppt.Location = "Room 1201"
oAppt.Start = Convert.ToDateTime("05/31/2004 9:00:00 AM")
oAppt.End = Convert.ToDateTime("05/31/2004 1:00:00 PM")
oAppt.ReminderSet = True
oAppt.ReminderMinutesBeforeStart = 5
oAppt.BusyStatus = Outlook.OlBusyStatus.olBusy
oAppt.IsOnlineMeeting = False
' Save to Calendar.
oAppt.Save()
' Clean up.
oApp = Nothing
oAppt = Nothing
End Sub
End Module -
7
Make any changes to the code to make it work for your situation, if you are skilled at VB.net code writing.
-
8
Press F5 on your keyboard to build, install and run the Vb.Net calendar program.
-
1