Manage Learn to apply best practices and optimize your operations.

Free Lotus Notes To Timex Datalink Synchronizer

Export your Lotus Notes calendar and/or addressbook to your Timex DataLink
watch. These scripts (technically, LotusScript Agents) export the information,
then start the DataLink program for you so you can send the data to your watch.
You can use one or both of these scripts. They are basically a poor-man's
version of the synchronization methods built into some personal information
managers. But, hey, they work!

Sub Initialize Dim sDataLinkDir As String
'Make sure to set this for your computer. The default is "C:\DataLink".
sDataLinkDir = "C:\DataLink" Dim nSession As New NotesSession
Dim nDb As NotesDatabase Dim nDC As NotesDocumentCollection
Dim nDoc As NotesDocument Dim nDateTime As NotesDateTime
Dim nItem As NotesItem Dim iFileNum As Integer
Dim sOutputString As String Dim sFileName As String
Dim iCurrentDoc As Integer Dim sDateTime As String
Dim sSubject As String Dim sTotal As String
Dim iNumAppts As Integer Dim sHeader As String Dim sDate As String
Dim sTime As String Dim iHour As Integer Dim iMinute As Integer
Dim iDay As Integer Dim iMonth As Integer Dim iYear As Integer
Dim sCopy As String Dim sCRLF As String sCopy = "?"
sCRLF = Chr$(13) & Chr$(10) Set nDb = nSession.CurrentDatabase
Set nDC = nDB.AllDocuments
sFileName = sDataLinkDir + "\DAT\TDLAPPT.DAT" iFileNum = Freefile
Open sFileName For Output As #iFileNum
sHeader = "[Appointments]" & sCRLF & "ApptSortOption=SortByDate" & sCRLF &
"ApptSendOption=SendApptData" & sCRLF & "ApptNotification=2" & sCRLF &
Print #iFileNum, sHeader For iCurrentDoc = 1 To nDC.Count
Set nDoc = nDC.GetNthDocument(iCurrentDoc)
Set nItem = nDoc.GetFirstItem("CalendarDateTime")
If Not (nItem Is Nothing )Then 'Check to make sure that this is a
calendar entry
Set nDateTime = nItem.DateTimeValue
sDate = nDateTime.DateOnly Dim fDateNow As Single
Dim fDateEvent As Single
fDateEvent = Datevalue (sDate)
fDateNow = Datevalue(Now)
If (fDateEvent >= fDateNow ) Then 'Date is today or earlier -
capture it
iDay = Day(sDate) iMonth=Month(sDate)
iYear = Year(sDate)
If iYear < 2000 Then 'DataLink takes in only 2 digits for
iYear = iYear - 1900 Else
iYear = iYear -2000 End If
sDate = Format$(iMonth, "00") & "/" & Format$(iDay, "00")
& "/" & Format$(iYear, "00")
sTime = nDateTime.TimeOnly
iHour = Hour(sTime)
iMinute = Minute(sTime)
sTime = Format$(iHour, "00") & ":" & Format$(iMinute, "00")
Set nItem = nDoc.GetFirstItem("Subject")
sSubject = Left$(nItem.Text, 31)
sTotal = sTotal & "Appt" & Format$(iNumAppts, "000") & "="
& sDate & sCopy & sTime & sCopy & sSubject & sCRLF
iNumAppts = iNumAppts + 1 End If
End If Next
Print #iFileNum, "ApptTotal=" & Trim$(Str$(iNumAppts))
Print #iFileNum, sTotal Close iFileNum 'Start Data Link program
Dim iProgram iProgram = Shell (sDataLinkDir + "\TIMEXDL.EXE", 1)
YieldEnd Sub
This was last published in November 2000

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...