How can I change Set db = NotesSession.GetDatabase(“degc-domino/degc”,CurDoc.Calendar(0)) to point user mail server. Some of the example in designer help, don’t explain this…
I am not a developer……
Thank
Sub Click(Source As Button)
Dim NotesSession As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim Doc As NotesDocument
Dim db As NotesDatabase
Dim UIDoc As NotesUIDocument
Dim CurDoc As NotesDocument
Set CurDoc = workspace.CurrentDocument.Document
Set db = NotesSession.GetDatabase("degc-domino/degc",CurDoc.Calendar(0))
Set doc = db.CreateDocument
doc.form = "Appointment"
doc.AppointmentType = "2"
doc.Subject = "Vacation. (Approved by " & CurDoc.Manager(0) & ") "
doc.StartDate = CurDoc.StartDate(0)
doc.Duration = CurDoc.CalDays(0)
doc.ExcludeFromView = "D"
Set UIDoc = Workspace.EditDocument(True,doc)
End Sub
Subject: Calendaring & Scheduling and Domain migration
You are correct, wrong fields
Thanks,
Subject: Calendaring & Scheduling and Domain migration
depends on where the code is going to run from? For example, if the user is running is from their own PC you could do this:
Dim server as String
server = NotesSession.GetEnvironmentString(“MailServer”, True)
Set db = NotesSession.GetDatabase(server,CurDoc.Calendar(0))
Subject: RE: Calendaring & Scheduling and Domain migration
Thanks,
That does open the calendar, but it does not insert, the date that filled in the vacation request form, “calendar”
Subject: RE: Calendaring & Scheduling and Domain migration
well that would be a different issue. Are you sure CurDoc has a value in the field you’re pulling the date from? Also, are you sure the field you’re looking at in the UI is StartDate and not StartDateTime or CalendarDateTime?