I am trying to use a dialog box to replace a date in a document. Following is the code:
Dim newdoc As New NotesDocument(db)
Call doc.CopyAllItems(newDoc, True)
Dim item As NotesItem
Dim datetime As NotesDateTime
Set item = doc.GetFirstItem("IssueDate")
Set datetime = item.DateTimeValue
Call ws.DialogBox("Schedule",True,True,True,True,False,False,"Schedule")
Dim uidoc2 As NotesUIDocument
Set uidoc2 = ws.CurrentDocument
Dim Count As Integer
Count = Cint(uidoc2.FieldGetText("Date1_1"))
If(Count > 0) Then
Dim item2 As String
item2 = uidoc2.FieldGetText(Date1)
Call newdoc.ReplaceItemValue("IssueDate",item2)
Call newdoc.Save(True,False)
End If
Everything works until I get to the following:
item2 = uidoc.FieldGetText(Date1)
The error is string expected. I thought the FieldGetText would convert the Date1 field to a string. Of course I have to figure out how to convert it back to a date as well.
Can someone tell me where I am going wrong?
Thanks so much.
Terry

Dialogbox Date problem (Terry Boger 23.May.06)
. . 