Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext

RE: Calendar entry spanning more than 1 day
Wesley Gaston 9.Sep.05 09:37 AM a Web browser
Domino Designer All Releases All Platforms


Here's the entire code for this agent I'm having a problem with spanning more than 1 day:

Sub Initialize
Dim ss As New notessession
Dim db As notesdatabase
Dim item As notesitem
Dim webdoc As NotesDocument
Dim doc As NotesDocument
Dim startdttm As NotesDateTime
Dim enddttm As NotesDateTime
Dim Description As Variant
Dim Exclude(1) As String
Dim rtitem As NotesRichTextItem

Set db = ss.CurrentDatabase
Set doc = New NotesDocument( Db )
Set rtitem = New NotesRichTextItem(Doc, "Body" )
Set webdoc = ss.DocumentContext

doc.form = "Appointment"
doc.AppointmentType = "3"
doc.NoticeType = "I"
doc.Alarms = "1"
Set item = New NotesItem(doc, "$Alarm", 1)
item.IsSummary = True
Set item = New NotesItem(doc, "$AlarmOffset", -30)

doc.Subject = "Session Notification: " & webdoc.Class(0)
doc.Location = webdoc.location(0)
doc.Logo = "AcNotesLtr"

'Time Zone Logic Start - GLT

Dim edb As New NotesDatabase(db.Server,"corp\employee.nsf")
Dim eview As NotesView
Dim edoc As NotesDocument
Dim mdoc As NotesDocument

Set eview = edb.GetView("CEBI")
Set edoc = eview.GetDocumentByKey(webdoc.StudentInitials(0),True)
If Not( edoc Is Nothing ) Then
Dim location, location2 As String
location = Left$(edoc.LOCATION(0),2)
Dim caltimezone As Integer
Select Case Location
Case "NY","CT","GR","GA", "CL", "KY" : caltimezone = 1
Case "SF", "MV", "LA" : caltimezone = -2
Case "SI" : caltimezone = 0
Case "AC" :
location2 = edoc.TC_FLOOR(0)
Select Case Location2
Case "NY","CT","GR","GA", "CL", "KY", "NJ", "MA", "FL", "MD", "NH", "PA", "NC", "OH" : caltimezone = 1
Case "SF", "MV", "LA", "CA", "OR" : caltimezone = -2
Case "MO", "TX", "AL", "IL", "MN" : caltimezone = 0
Case Else : caltimezone = 0
End Select
Case Else : caltimezone = 0
End Select
Else
caltimezone = 0
End If
If doc.Location(0) = "New York" Then
caltimezone = caltimezone - 1
End If
If doc.Location(0) = "Mountain View" Then
caltimezone = caltimezone + 2
End If

doc.StartTimeZone = "Z=6$DO=1$DL=4 1 1 10 -1 1$ZX=25$ZN=Central"
doc.EndTimeZone = "Z=6$DO=1$DL=4 1 1 10 -1 1$ZX=25$ZN=Central"
'Time Zone Logic End

Set startdttm = New NotesDateTime(webdoc.date(0) & " " & webdoc.time(0))
Set enddttm = New NotesDateTime(webdoc.enddate(0) & " " & webdoc.endtime(0))
doc.CalendarDateTime = startdttm.LSLocalTime
doc.StartDateTime = startdttm.LSLocalTime

doc.StartDate = startdttm.LSLocalTime
doc.StartTime = startdttm.LSLocalTime
doc.EndDateTime = enddttm.LSLocalTime
doc.EndDate = enddttm.LSLocalTime
doc.EndTime =enddttm.LSLocalTime
Call rtitem.AppendText(webdoc.Description)

Exclude(0) = "D"
Exclude(1) = "S"
Set Item = Doc.ReplaceItemValue("$StorageTo", "1")
Set Item = Doc.ReplaceItemValue("$PublicAccess", "1")
Set Item = Doc.ReplaceItemValue("CalendarDateTime", webdoc.date(0))
Set Item = Doc.ReplaceItemValue("ExcludeFromView", Exclude)
Set Item = Doc.ReplaceItemValue("_ViewIcon",133)
doc.tmpDoNotProcess = "1"

Call Doc.ComputeWithForm (True, False)
Doc.Principal = "CompanyFunctions Admin/MO/americancentury@americancentury"
Doc.ReplyTo = "xxx"
Doc.INetFrom = "xxx"
Call doc.Send( False, webdoc.StudentInitials(0))
Call doc.PutInFolder("($Alarms)")

End Sub




Calendar entry spanning more than 1... (Wesley Gaston 9.Sep.05)
. . RE: Calendar entry spanning more th... (Wesley Gaston 9.Sep.05)
. . . . RE: Calendar entry spanning more th... (Wesley Gaston 9.Sep.05)
. . . . . . RE: Calendar entry spanning more th... (Stan Rogers 9.Sep.05)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite