OpenNTF.org - Small agent which can fix cale
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Small agent which can fix calendar entrys after migration from Exchange 2003 to Lotus Domino 
Rating:
Rating: 5 , Number of votes: 1 
Contributor:
Bastian Wieczorek 
Category:
Lotusscript 
Type:
Administration 
Document Release:
1.0 
Notes Version:
R8.x, R7.x 
Last Modified:
18 Jun 2010 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
After migrating the mailfile, contacts and calendar entrys from Exchange 2003 to Lotus Domino it might happen that some documents arenīt visible in the calendar, only in the all documents view. This small agent can fix these documents.


-------
Dim ns As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim viewCol As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As NotesDocument
Dim stDateItem As NotesItem

Set db = ns.CurrentDatabase
Set view = db.GetView("($Meetings)")

Set viewCol = view.AllEntries

Set entry = viewCol.GetFirstEntry

While Not entry Is Nothing
Set doc = entry.Document
Set entry = viewCol.GetNextEntry(entry)
If doc.HasItem("StartDate") Then
Set stDateItem = doc.GetFirstItem("StartDate")
Call doc.ReplaceItemValue("CalendarDateTime", stDateItem.GetValueDateTimeArray()(0))
Call doc.Save(True,False,True)
End If

Wend

Usage / Example
Code Attachments
agent.txt (1 Kbytes)
 Comments

No documents found

 Add your comment!