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!
'See http://www.bestweb.net/~mcdonnel/datalink.htm

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 first published in November 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.