69
How do I encode data as ICalendar format

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content
		With .Components.Add("VCALENDAR")
			.Properties.Add("VERSION","2.1").Parameters.Add("UNICODE",Exicalendar1.get_toICalendar(True,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeBoolean))
			.Properties.Add("TEXT","This is just a bit of text to be encoded.")
			.Properties.Add("BINARY",Exicalendar1.get_toICalendar("This is just a bit of text to be encoded.",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeBinary))
			With .Components.Add("VEVENT")
				.Properties.Add("DTSTART",#1/1/2001#)
				.Properties.Add("DTEND",#1/2/2001 10:00:00 AM#)
			End With
		End With
	End With
	Debug.Print( .Save() )
End With
68
How do I get the occurrences between giving start/end margins

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( "AsArray: " )
	Debug.Print( .get_RecurRange("DTSTART=19970310;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3",#1/1/2001#,#1/1/2002#) )
	Debug.Print( "AsString: " )
	Debug.Print( .get_RecurRangeAsString("DTSTART=19970310;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3",#1/1/2001#,#1/1/2002#) )
End With
67
How do I get the value of specified part in the recurrence expression

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( "FREQ: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurFREQ) )
	Debug.Print( "DTSTART: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurDTSTART) )
	Debug.Print( "UNTIL: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurUNTIL) )
	Debug.Print( "COUNT: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurCOUNT) )
	Debug.Print( "INTERVAL: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurINTERVAL) )
	Debug.Print( "WKST: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurWKST) )
	Debug.Print( "BYDAY: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYDAY) )
	Debug.Print( "BYMONTHDAY: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYMONTHDAY) )
	Debug.Print( "BYYEARDAY: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYYEARDAY) )
	Debug.Print( "BYWEEKNO: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYWEEKNO) )
	Debug.Print( "BYMONTH: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYMONTH) )
	Debug.Print( "BYSETPOS: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYSETPOS) )
	Debug.Print( "BYHOUR: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYHOUR) )
	Debug.Print( "BYMINUTE: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYMINUTE) )
	Debug.Print( "BYSECOND: " )
	Debug.Print( .get_RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",exontrol.EXICALENDARLib.RecurPartEnum.exRecurBYSECOND) )
End With
66
How do I check if the recurrence expression is syntactically correct (method 2)

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( "1.A) SyntaxError: " )
	Debug.Print( .get_RecurPartValue("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",exontrol.EXICALENDARLib.RecurPartEnum.exRecurSyntaxError) )
	Debug.Print( "1.B) SyntaxErrorInfo: " )
	Debug.Print( .get_RecurPartValue("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",exontrol.EXICALENDARLib.RecurPartEnum.exRecurSyntaxErrorInfo) )
	Debug.Print( "2.A) SyntaxError: " )
	Debug.Print( .get_RecurPartValue("FREQ=DAILY;BYDAY=MO",exontrol.EXICALENDARLib.RecurPartEnum.exRecurSyntaxError) )
	Debug.Print( "2.B) SyntaxErrorInfo: " )
	Debug.Print( .get_RecurPartValue("FREQ=DAILY;BYDAY=MO",exontrol.EXICALENDARLib.RecurPartEnum.exRecurSyntaxErrorInfo) )
End With
65
How do I check if the recurrence expression is syntactically correct (method 1)

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( "1. If negative, the expression is incorrect" )
	Debug.Print( .get_RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",#12/5/2015#) )
	Debug.Print( "2. If negative, the expression is incorrect" )
	Debug.Print( .get_RecurCheck("junk",#1/1/2001#) )
End With
64
How do I check if a specified date match the giving recurrence

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( #12/5/2015# )
	Debug.Print( .get_RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",#12/5/2015#) )
	Debug.Print( #12/7/2015# )
	Debug.Print( .get_RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",#12/7/2015#) )
End With
63
Recur: The 2nd to last weekday of the month

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970929;FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2",12) )
End With
62
Recur: The 3rd instance into the month of one of Tuesday, Wednesday or Thursday, for the next 3 months

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970904;FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3",12) )
End With
61
Recur: The last work day of the month

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970805;FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1",12) )
End With
60
Recur: An example where the days generated makes a difference because of WKST (Sample 2)

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",12) )
End With
59
Recur: An example where the days generated makes a difference because of WKST (Sample 1)

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO",12) )
End With
58
Recur: Every 20 minutes from 9:00 AM to 4:40 PM every day

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;BYHOUR=9,10,11,12,13,14,15,16;BYMINUTE=0,20,40",12) )
End With
57
Recur: Every hour and a half for 4 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=MINUTELY;INTERVAL=90;COUNT=4",12) )
End With
56
Recur: Every 15 minutes for 6 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=MINUTELY;INTERVAL=15;COUNT=6",12) )
End With
55
Recur: Every 3 hours from 9:00 AM to 5:00 PM on a specific day

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z",12) )
End With
54
Recur: Every four years, the first Tuesday after a Monday in November, forever (U.S. Presidential Election day)

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19961105T090000;FREQ=YEARLY;INTERVAL=4;BYMONTH=11;BYDAY=TU;BYMONTHDAY=2,3,4,5,6,7,8",12) )
End With
53
Recur: The first Saturday that follows the first Sunday of the month, forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970913T090000;FREQ=MONTHLY;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13",12) )
End With
52
Recur: Every Friday the 13th, forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13",12) )
End With
51
Recur: Every Thursday, but only during June, July, and August, forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970605T090000;FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8",12) )
End With
50
Recur: Every Thursday in March, forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970313T090000;FREQ=YEARLY;BYMONTH=3;BYDAY=TH",12) )
End With
49
Recur: Monday of week number 20 (where the default start of the week is Monday), forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970512T090000;FREQ=YEARLY;BYWEEKNO=20;BYDAY=MO",12) )
End With
48
Recur: Every 20th Monday of the year, forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970101T090000;FREQ=YEARLY;BYDAY=20MO",12) )
End With
47
Recur: Every 3rd year on the 1st, 100th and 200th day for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970101T090000;FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200",12) )
End With
46
Recur: Every other year on January, February, and March for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970310T090000;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3",12) )
End With
45
Recur: Yearly in June and July for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970610T090000;FREQ=YEARLY;COUNT=10;BYMONTH=6,7",12) )
End With
44
Recur: Every Tuesday, every other month

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=MONTHLY;INTERVAL=2;BYDAY=TU",12) )
End With
43
Recur: Every 18 months on the 10th thru 15th of the month for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970910T090000;FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,13,14,15",12) )
End With
42
Recur: Monthly on the first and last day of the month for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970930T090000;FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1",12) )
End With
41
Recur: Monthly on the 2nd and 15th of the month for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15",12) )
End With
40
Recur: Monthly on the third to the last day of the month, forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970928T090000;FREQ=MONTHLY;BYMONTHDAY=-3",12) )
End With
39
Recur: Monthly on the second to last Monday of the month for 6 months

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970922T090000;FREQ=MONTHLY;COUNT=6;BYDAY=-2MO",12) )
End With
38
Recur: Every other month on the 1st and last Sunday of the month for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970907T090000;FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU",12) )
End With
37
Recur: Monthly on the 1st Friday until December 24, 1997

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970905T090000;FREQ=MONTHLY;UNTIL=19971224T000000Z;BYDAY=1FR",12) )
End With
36
Recur: Monthly on the 1st Friday for ten occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970905T090000;FREQ=MONTHLY;COUNT=10;BYDAY=1FR",12) )
End With
35
Recur: Every other week on Tuesday and Thursday, for 8 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH",12) )
End With
34
Recur: Every other week on Monday, Wednesday and Friday until December 24, 1997, but starting on Tuesday, September 2, 1997

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;INTERVAL=2;UNTIL=19971224T000000Z;WKST=SU;BYDAY=MO,WE,FR",12) )
End With
33
Recur: Weekly on Tuesday and Thursday for 5 weeks

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;UNTIL=19971007T000000Z;WKST=SU;BYDAY=TU,TH",12) )
End With
32
Recur: Weekly on Tuesday and Thursday for 5 weeks

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH",12) )
End With
31
Recur: Every other day - forever

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;INTERVAL=2",12) )
End With
30
Recur: Daily until December 24, 1997

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;UNTIL=19971224T000000Z",12) )
End With
29
Recur: Daily for 10 occurrences

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( .get_RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;COUNT=10",12) )
End With
28
How can I add a property of UTC offset type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("UTCOffset","+0100")
	End With
	Debug.Print( .Save() )
End With
27
How can I add a property of URI type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("URI","http://www.exontrol.com")
	End With
	Debug.Print( .Save() )
End With
26
How can I add a property of time type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Time1",#12/30/1899 0:00:00 PM#)
		.Properties.Add("Time2",Exicalendar1.get_toICalendar(0.5,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeTime))
		With .Properties.Add("Time3")
			.Value = 0.5
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeTime
		End With
	End With
	Debug.Print( .Save() )
End With
25
How can I add a property of text/string type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Text1","A1")
		.Properties.Add("Text2",Exicalendar1.get_toICalendar("A1",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeText))
		With .Properties.Add("Text3")
			.Value = "A1"
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeText
		End With
	End With
	Debug.Print( .Save() )
End With
24
How can I find properties of recurence type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
Dim i,p
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Recur","FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=SA,SU")
	End With
	p = .Root.Properties.Item("Recur")
	i = .get_toICalendar(p.Value,p.GuessType)
	Debug.Print( "icalendar:" )
	Debug.Print( i )
	Debug.Print( "all:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"") )
	Debug.Print( "FREQ:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"FREQ") )
	Debug.Print( "UNTIL:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"UNTIL") )
	Debug.Print( "COUNT:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"COUNT") )
	Debug.Print( "INTERVAL:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"INTERVAL") )
	Debug.Print( "BYSECOND:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYSECOND") )
	Debug.Print( "BYMINUTE:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYMINUTE") )
	Debug.Print( "BYHOUR:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYHOUR") )
	Debug.Print( "BYDAY:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYDAY") )
	Debug.Print( "BYMONTHDAY:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYMONTHDAY") )
	Debug.Print( "BYYEARDAY:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYYEARDAY") )
	Debug.Print( "BYWEEKNO:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYWEEKNO") )
	Debug.Print( "BYMONTH:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYMONTH") )
	Debug.Print( "BYSETPOS:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"BYSETPOS") )
	Debug.Print( "WKST:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"WKST") )
End With
23
How can I add a property of recurrence type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Recur","FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU")
	End With
	Debug.Print( .Save() )
End With
22
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
Dim i,p
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Period",Exicalendar1.get_valuesToICalendar("Start=#1/1/2001#;Duration=1",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypePeriod))
	End With
	p = .Root.Properties.Item("Period")
	i = .get_toICalendar(p.Value,p.GuessType)
	Debug.Print( "icalendar:" )
	Debug.Print( i )
	Debug.Print( "all:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"") )
	Debug.Print( "start:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"Start") )
	Debug.Print( "end:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"End") )
	Debug.Print( "duration:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"Duration") )
	Debug.Print( "weeks:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"W") )
	Debug.Print( "days:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"D") )
	Debug.Print( "hour:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"H") )
	Debug.Print( "min:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"M") )
	Debug.Print( "sec:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"S") )
End With
21
How can I add a property of period type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Period1",Exicalendar1.get_valuesToICalendar("Start=#1/1/2001#;Duration=1",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypePeriod))
		.Properties.Add("Period2",Exicalendar1.get_valuesToICalendar("Start=#1/1/2001#;End=#1/2/2001#",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypePeriod))
		.Properties.Add("Period3",Exicalendar1.get_valuesToICalendar("Duration=1;End=#1/2/2001#",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypePeriod))
	End With
	Debug.Print( .Save() )
End With
20
How can I add a property of integer type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Integer1",1)
		.Properties.Add("Integer2",Exicalendar1.get_toICalendar(1,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeInteger))
		With .Properties.Add("Integer3")
			.Value = 1
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeInteger
		End With
	End With
	Debug.Print( .Save() )
End With
19
How can I add a property of float type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Float1",1.5)
		.Properties.Add("Float2",Exicalendar1.get_toICalendar(1.5,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeFloat))
		With .Properties.Add("Float3")
			.Value = 1.5
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeFloat
		End With
	End With
	Debug.Print( .Save() )
End With
18
How do I get the type of the property

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Duration1",Exicalendar1.get_toICalendar(2.5,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration))
		With .Properties.Add("Duration2")
			.Value = 2.5
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration
		End With
	End With
	With .Root.Properties.Item("Duration1")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
	With .Root.Properties.Item("Duration2")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
End With
17
How can I get values of the duration iCalendar format

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	Debug.Print( "all:" )
	Debug.Print( .get_valuesFromICalendar("P1D",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration,"") )
	Debug.Print( "duration:" )
	Debug.Print( .get_valuesFromICalendar("P1D",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration,"Duration") )
End With
16
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
Dim i,p
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Duration",Exicalendar1.get_toICalendar(3.325,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration))
	End With
	p = .Root.Properties.Item("Duration")
	i = .get_toICalendar(p.Value,p.GuessType)
	Debug.Print( "icalendar:" )
	Debug.Print( i )
	Debug.Print( "all:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"") )
	Debug.Print( "duration:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"Duration") )
	Debug.Print( "weeks:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"W") )
	Debug.Print( "days:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"D") )
	Debug.Print( "hour:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"H") )
	Debug.Print( "min:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"M") )
	Debug.Print( "sec:" )
	Debug.Print( .get_valuesFromICalendar(i,p.GuessType,"S") )
End With
15
How can I add a property of duration type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Duration1",Exicalendar1.get_toICalendar(2.5,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration))
		With .Properties.Add("Duration2")
			.Value = 2.5
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration
		End With
		.Properties.Add("Duration3",Exicalendar1.get_valuesToICalendar("D=2;H=12",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration))
	End With
	Debug.Print( .Save() )
End With
14
How can I add a property of date-time type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("DateTime1",#1/1/2001 0:00:00 PM#)
		.Properties.Add("DateTime2",Exicalendar1.get_toICalendar(#1/1/2001#,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDateTime))
		With .Properties.Add("DateTime3")
			.Value = #1/1/2001#
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDateTime
		End With
	End With
	Debug.Print( .Save() )
End With
13
How can I add a property of date type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Date1",#1/1/2001#)
		.Properties.Add("Date2",Exicalendar1.get_toICalendar(#1/1/2001#,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDate))
		With .Properties.Add("Date3")
			.Value = #1/1/2001#
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDate
		End With
	End With
	Debug.Print( .Save() )
End With
12
How can I add a property of Calendar User Address type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("caladdress1","mailto:support@exontrol.com")
		.Properties.Add("caladdress2",Exicalendar1.get_toICalendar("mailto:support@exontrol.com",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeCalAddress))
		With .Properties.Add("caladdress3")
			.Value = "mailto:support@exontrol.com"
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeCalAddress
		End With
	End With
	Debug.Print( .Save() )
End With
11
How can I add a property of boolean type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Boolean1",True)
		.Properties.Add("Boolean2",Exicalendar1.get_toICalendar("TRUE",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeBoolean))
		With .Properties.Add("Boolean3")
			.Value = 0
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeBoolean
		End With
	End With
	Debug.Print( .Save() )
End With
10
How can I add a property of binary type

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Binary1",Exicalendar1.get_toICalendar("This is a bit of text converted to binary",exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeBinary))
		With .Properties.Add("Binary2")
			.Value = "This is a bit of text converted to binary"
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeBinary
		End With
	End With
	Debug.Print( .Save() )
End With
9
How can I access the root element of the iCalendar format

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	.Load("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR")
	Debug.Print( .Root.Name )
	Debug.Print( .Root.Properties.Item("Version").Value )
End With
8
How can I get notified once the control loads a new component, property, when using Load or LoadFile methods

' AddComponent event - Occurs when a new component is added.
Private Sub Exicalendar1_AddComponent(ByVal sender As System.Object,ByVal NewComponent As exontrol.EXICALENDARLib.Component) Handles Exicalendar1.AddComponent
	With Exicalendar1
		Debug.Print( NewComponent )
	End With
End Sub

' AddProperty event - Occurs when a new property is added.
Private Sub Exicalendar1_AddProperty(ByVal sender As System.Object,ByVal NewPropery As exontrol.EXICALENDARLib.Property) Handles Exicalendar1.AddProperty
	With Exicalendar1
			Debug.Print( NewPropery )
	End With
End Sub

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	.FireEvents = True
	.Load("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR")
End With
7
How can I add a property with parameters

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		With .Components.Add("VEVENT").Properties
			.Add("SUMMARY","Company Holiday Party").Parameters.Add("LANGUAGE","en-US")
			.Add("DATE",#1/1/2001#)
		End With
	End With
	Debug.Print( .Save() )
End With
6
How can I load iCalendar from a string

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	.Load("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR")
	Debug.Print( .Content.Components.Item(0).Name )
End With
5
How can I add VEVENT objects

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		With .Properties
			.Add("Version","2.0")
			.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN")
		End With
		With .Components.Add("VEVENT").Properties
			.Add("DTSTART",#1/1/2001#)
			.Add("DTEND",#1/2/2001#)
			.Add("SUMMARY","First Party")
		End With
		With .Components.Add("VEVENT").Properties
			.Add("DTSTART",#1/4/2001#)
			.Add("DTEND",#1/5/2001#)
			.Add("SUMMARY","Second Party")
		End With
	End With
	Debug.Print( .Save() )
End With
4
How can I save the control's content to iCalendar format, as a file
' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		With .Properties
			.Add("Version","2.0")
			.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN")
		End With
		With .Components.Add("VEVENT").Properties
			.Add("DTSTART",#1/1/2001#)
			.Add("DTEND",#1/2/2001#)
			.Add("SUMMARY","Bastille Day Party")
		End With
	End With
	.SaveFile("c:/temp/test.ical")
End With
3
How can I load the iCalendar format from a file

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	.LoadFile("c:/temp/test.ical")
	Debug.Print( .Content.Components.Item("VCALENDAR").Properties.Item("PRODID").Value )
End With
2
How do I export the control's content to iCalendar format

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		With .Properties
			.Add("Version","2.0")
			.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN")
		End With
		With .Components.Add("VEVENT").Properties
			.Add("DTSTART",#1/1/2001#)
			.Add("DTEND",#1/2/2001#)
			.Add("SUMMARY","Bastille Day Party")
		End With
	End With
	Debug.Print( .Save() )
End With
1
How can I generate a VCALENDAR object

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR").Properties
		.Add("Version","2.0")
		.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN")
	End With
	Debug.Print( .Save() )
End With