Subject: Can someone help me with a formula? Please
You would be better off using Lotus Script
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim BinDoc As NotesDocument
Dim TempDate As New NotesDateTime (“”)
Set db=session.CurrentDatabase
ExcelPath=Inputbox$(“Enter Excel Path”,“Excel Import”,“c:\temp”)
If ExcelPath=“” Then Goto finishup
If Right(ExcelPath,1)<>“" Then ExcelPath=ExcelPath+”"
ExcelFiles=Inputbox$(“Enter File Name”,“Excel Import”,“*.xls”)
If ExcelFiles=“” Then Goto finishup
ExcelFile=Dir$(ExcelPath+ExcelFiles)
While ExcelFile<>“”
Set xls=GetObject(ExcelPath+ExcelFIle,“”)
LastStreet$=“”
Forall sheet In xls.Worksheets
Street$=ProperCase(Trim(sheet.name))
RoundName$=Trim(sheet.range(“B5”).value)
RoundDay$=ProperCase(sheet.range(“B7”).value)
’ cycle thru a10…f47 range of bin details
For x%=10 To 47
HouseNum$=Trim(sheet.range(“A”+Ltrim(Str$(x%))).value)
If HouseNum$<>“” Then
Comments$=Trim(sheet.range(“F”+Ltrim(Str$(x%))).value)
Assist$=sheet.range(“E”+Ltrim(Str$(x%))).value
Set BinDoc= New NotesDocument(db)
BinDoc.Form=“Bin”
Set TempItem= New NotesItem( BinDoc, “BinStreet”,Street$)
TempItem.IsSummary=True
Set TempItem= New NotesItem( BinDoc, “BinHouse”,HouseNum$)
TempItem.IsSummary=True
Set TempItem= New NotesItem( BinDoc, “BinDay”,RoundDay$)
TempItem.IsSummary=True
TempItem.IsSummary=True
Set TempItem= New NotesItem( BinDoc, “BinAssistance”,Assist$)
TempItem.IsSummary=True
Set TempItem= New NotesItem( BinDoc, “BinComments”,Comments$)
TempItem.IsSummary=True
Call BinDoc.Save (True,True)
Delete BinDoc
End If
Next
End Forall
ExcelFile=Dir$
Wend
FinishUp:
End Sub