473,382 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Checking Calender items

Hi,
I am trying to find the number of meetings request in the outlook calendar
using below code. But I am getting error message. The strFilter value I have
tried both "&&" and "AND" but still i am getting 'Type mismatch error
message'. Please help me what is the problem in this code.

string Appointmentline;
string[] AppointmentInfo;
string dateStart = System.DateTime.Now.AddDays(-30).ToString();
string dateEnd = System.DateTime.Now.AddDays(30).ToString();
string emailId = "", strFilter = "[Start] >= '" + dateStart + "' && [End] <=
'" + dateEnd +"'";

Outlook._Application olApp1 = new Outlook.ApplicationClass();
Outlook._NameSpace olNs1 = olApp1.GetNamespace("MAPI");
oContacts =
olNs1.GetDefaultFolder(Outlook.OlDefaultFolders.ol FolderCalendar);

MessageBox.Show(strFilter);

Outlook.Items filterItems = oContacts.Items.Restrict(strFilter);

if (filterItems.Count != 0)
MessageBox.Show("No of items found" + filterItems.Count.ToString());
else
MessageBox.Show("No items found");
return;

thanks
Oct 13 '06 #1
0 1000

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jason | last post by:
Hi Everyone, I would really appreciate some thoughts on how best to tackle an availability calender in ASP for our yacht fleet. I need to be able to show the booking STATUS of a particular...
8
by: LG | last post by:
I want a script to make a calender for any month and with week numbers. Anyone who knows how to do that in javascript? LG
8
by: PerryC | last post by:
I want to be able to accomplish this, please help: When click on the DOB field, a ActiveX Calender popup and the user choose a date, the value is automatically refreshed in the DOB field in the...
4
by: Chris | last post by:
Hi, I am trying to create a popup calender so a user can click on a button on the main form, a calender will then popup, the user will select a date and then click ok on the popup. The date will...
0
by: Steven Blair | last post by:
Hi, I would like to create a Calender effect like this website: http://www.expedia.co.uk/default.aspx This site uses ASP.NET, so I guess we should be able to use VS 2005 to recreate this. ...
0
by: kalichakradhar | last post by:
hi all, hi, I am developing a application which would open the shared calender of outlook and read the meeting notices and also modifies the meeting notice from Vb.I am successful in opening the...
7
by: gubbachchi | last post by:
Hi all, In my application I need to display the data fetched from mysql database after the user selects date from javascript calender. I have written the code in which after the user selects the...
21
Vkas
by: Vkas | last post by:
i had created my own web calender control!!!! it consist 1} text box (it display's the selected date) 2} button (it hide and show the calender control) 3} calender control (use for the selection...
1
by: xtremebass | last post by:
Hello Bytes, i have a calender program which is created by using Javascript. when i execute that program using Internet Explorer,it works properly but when i tried in Mozilla firefox it didnt...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.