473,624 Members | 2,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Outlook and recurrence items...

I'm trying to make my VB read my outlook Calendar, and show me my todays
tasks. The connection is no problem and I have a collection of items with all
my calendar items... The problem is to decide whitch of them are regarding
today's date? Normal calendar items have start and end date, and it's easy to
calculate theese items... (But I have to loop, one by one to check..) But the
Recurrence items have start and end the day it was created.. and if I have a
appointment whitch starts on 1. january, and ends 31. december, from 07:00 to
08:00 every monday and friday, and one other appointment each tuesday and
wednesday from 14:00 to 15:00... how do I manage to sort out this
appointments?? I want to get all apointments on 07.09.2004 or just type in a
date, and get mye selected items in a collection...

Is there any easy solution on this? Or is it really necesary to check each
object and calculate the recurrance if it hits the current search date...
Nov 21 '05 #1
3 3989
What is the method you used to get the start and end date of the item? If
you're using ADO or WebDAV then the properties you should check are
urn:schemas:cal endar:dtstart and urn:schemas:cal endar:dtend, they'll tell
you the actual date of the item, not the date it was created. For a good
sample on retrieving calendar items take a look at

http://msdn.microsoft.com/library/en...recurring_appo
intment_expansi on.asp

Cheers,
John Wadie

Nov 21 '05 #2
The calendar is not connected to a user... it's among the public folders..

I'm accessing the objects using this code:

Set myOlApp = New Outlook.Applica tion
Set MyNameSpace = myOlApp.GetName space("MAPI")
Set myFolders = MyNameSpace.Fol ders
Set myFolder = myFolders.Item( "Public Folders")
Set myFolder2 = myFolder.Folder s.Item("All Public Folders")
Set myFolder3 = myFolder2.Folde rs.Item("Compan yname")
Set myAlarmCal = myFolder3.Folde rs.Item("Calend ar")

The tree-structure is:
---Public folders
---All Public Folders
---Companyname
---Calendar

I then make a object with all the calendar items from the Calendar folder:

myAlarmCal.Item s.IncludeRecurr ences = True
Set myApptItems = myAlarmCal.Item s

the object MyApptItems then contains ALL the items in the Calendar... but if
I try to retrieve the calendar objects like this:

For Each myAppt In myApptItems
If myAppt.Start < Now And myAppt.End > Now Then
tekst = tekst & myAppt.Start & "-" & myAppt.End & " -->" &
myAppt.Subject & vbCrLf
End If
Next
MsgBox tekst

(I've made an "light" version of my problem.. but this soes not either
works...) The only way to have this routine to see the recurrence items is
if the object starts om this dag. (First occurence).. I would hope there was
a routine that gave true or false if I tested on a date...

Maybe like this:
if myappt.occuranc e(now)=true then :-)

I'm not familiar with CDO... and i don't know if it works on exchange
server version 5.5, on NT-platform....

"John Wadie" wrote:
What is the method you used to get the start and end date of the item? If
you're using ADO or WebDAV then the properties you should check are
urn:schemas:cal endar:dtstart and urn:schemas:cal endar:dtend, they'll tell
you the actual date of the item, not the date it was created. For a good
sample on retrieving calendar items take a look at

http://msdn.microsoft.com/library/en...recurring_appo
intment_expansi on.asp

Cheers,
John Wadie

Nov 21 '05 #3
CDO for Exchange 2000 (CDOEX) will not work on Exchange 5.5. I guess you'd
better post your question to one of the Outlook or Exchange newsgroups.

Regards,
John Wadie

Nov 21 '05 #4

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

Similar topics

9
7364
by: John | last post by:
Hi I am using the following code to search for an email message with id myID; Dim SentFld As Outlook.MAPIFolder Dim Email As Outlook.MailItem Dim I As Integer OutlookApp = New Outlook.Application SentFld =
1
1850
by: Himselff | last post by:
Hi guys, Im developing a lil add-in that is goiing to allow the user by a button click to auto print PDF doc which are attach to hes emails, i think the things is to simple cause its not working at all, hope u guys can gimme a hand , heres the code, Public Sub OnStartupComplete(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnStartupComplete
7
3605
by: Chris Thunell | last post by:
I'm trying to loop through an exchange public folder contact list, get some information out of each item, and then put it into a vb.net datatable. I run though the code and all works fine until i get to item 250 i get a "system.invalid cast exception" and "specified cast is not valid". Once i get this error and try to go to the next record.. every record after gets the same error... It's like the com connection to outlook has been lost....
2
1814
by: Snig | last post by:
Hi I'm into creating a web application in C# (.NET Framework 1.1) which would list and manage the outlook tasks. If I try to do this in a Windows Application, it works fine. But there are many issues in case of Web application. Code: Outlook.Application app = new Outlook.Application();
5
3316
by: Arno R | last post by:
Hi all, I need to get at specific (shared) agenda-data from MS outlook 2003. I need every day to get the scheduled 'appointments' for some rooms to Access. In Access I will show the time-periods that the rooms are booked for that day. I know how to code all this in Access. I can show some testdata for 5 rooms quite nicely on a form. I never ever needed to use Outlook-to-Access before, so I need a good starting point to get the data.
5
2190
by: rdemyan via AccessMonster.com | last post by:
I would like to have my application add administrative tasks to an Administrator's Outlook Task Folder. I know how to get the User group of the CurrentUser and think I can even code how to do the actual additions. A couple of questions: 1) How do I code it so that it only occurs once - the first time the administrator opens my app. I think I need code that checks if the tasks are already there in Outlook and then aborts if they are....
2
7290
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a "Array index out of bounds". Microsoft.Office.Interop.Outlook._Application olApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office.Interop.Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
7
6802
by: Dean Spencer | last post by:
Can anyone help? I am importing Emails from Outlook using the following code: Public Function ScanInbox(SubjectLine As String) Dim TempRst As Recordset Dim OlApp As Outlook.Application Dim Inbox As Outlook.MAPIFolder Dim InboxItems As Outlook.Items Dim Mailobject As Object Set OlApp = CreateObject("Outlook.Application")
11
7695
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which enabled me to the contacts at least list. I had to root around to discover CdoDefaultFolderContacts (though it was guessable; how could I enumerate win32com.client.constants?). I now want to work through the Contacts in Outlook patching in...
0
8249
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8633
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.