RECUPERER DES DATES DANS L'AGENDA

Forum destiné aux questions sur le développement : Formules, LotusScript, Java ...

RECUPERER DES DATES DANS L'AGENDA

Messagepar M@rcello » 02 Fév 2004 à 17:02

BonjourJe cherche toujours comment récuperer dans l'agenda des dates autre que celle du jour en cours. J'ai beau avoir comme date 31/12/2003 l'agenda s'ouvre toujours a la date du jour...j'ai le code suivantStartDate et Endate champs de l'agendaStartDate1 et Endate1 champs de ma vue Code......doc.StartDate = CurDoc.StartDate1(0)doc.EndDate = CurDoc.EndDate1(0)Merci d'avance
M@rcello
 

Re: RECUPERER DES DATES DANS L'AGENDA

Messagepar sandrine » 02 Fév 2004 à 17:22

bonjour,voici un agent qui tourne toutes les nuits et qui mets à jour les agendas.Peut-être pourra tu y récupérer ce que tu cherchesSub Initialize Dim s As New NotesSession Dim db As NotesDatabase Set db = s.currentdatabase Dim v As NotesView Set v = db.getview("agendamaj") Dim vecol As NotesViewEntryCollection Set vecol = v.allEntries Dim ventry As NotesViewEntry Set ventry = vecol.GetFirstEntry() Dim doc As NotesDocument Set doc = v.getfirstdocument Dim dbevent As NotesDatabase Set dbevent = s.getdatabase("Mail/meffre",doc.r_base(0)) Dim eventdoc As NotesDocument Dim Nextdoc As NotesDocument While Not (doc Is Nothing) Set nextdoc = v.getnextdocument(doc) Set eventdoc=New notesdocument(dbevent) Set Form = New notesitem(eventdoc,"Form","Appointment") Form.IsSummary =True Set busyname = New notesitem(eventdoc,"$BusyName",doc.v_demandeur(0),NAMES) busyname.IsSummary =True Set busypriority = New notesitem(eventdoc,"$BusyPriority","1") busypriority.IsSummary=True busypriority.IsNames=True Set altprincipal = New notesitem(eventdoc,"$AltPrincipal",doc.v_demandeur(0)) altprincipal.IsSummary=True Set csversion = New notesitem(eventdoc,"$CSVersion","2") csversion.IsSummary=True Set langchair = New notesitem(eventdoc,"$LangChair","") langchair.IsSummary=True Set langprincipal = New notesitem(eventdoc,"$LangPrincipal","") langprincipal.IsSummary=True Set smtp = New notesitem(eventdoc,"$SMTPKeepNotesItems","1") smtp.IsSummary=True Set webflags = New notesitem(eventdoc,"$WebFlags","J") webflags.IsSummary=True Set alarm = New notesitem(eventdoc,"Alarms","") alarm.IsSummary=True Set expandgroup = New notesitem(eventdoc,"$ExpandGroups","3") expandgroup.IsSummary = True Set PublicAccess = New notesitem(eventdoc,"$PublicAccess","1") PublicAccess.IsSummary= True verifFin= doc.End_Date(0)+" 20:00:00" Set NoPurge = New notesitem(eventdoc,"$NoPurge",Cdat(veriffin)) NoPurge.IsSummary= True Set BookFreeTime = New notesitem(eventdoc,"BookFreeTime","") BookFreeTime.IsSummary= True Set Location = New notesitem(eventdoc,"Location","") Location.IsSummary= True Set Categories = New notesitem(eventdoc,"Categories","") Categories.IsSummary= True Set CopyTo = New notesitem(eventdoc,"CopyTo","") CopyTo.IsSummary= True CopyTo.IsNames= True Set Encrypt = New notesitem(eventdoc,"Encrypt ","0") encrypt.IsSummary= True Set OrgConfidential = New notesitem(eventdoc,"OrgConfidential","") OrgConfidential.IsSummary= True Set SendTo = New notesitem(eventdoc,"SendTo","",NAMES) SendTo.IsSummary= True Set CHAIR = New notesitem(eventdoc,"CHAIR",doc.v_demandeur(0)) CHAIR.IsSummary= True Set itemFrom=New notesitem(eventdoc,"From",doc.v_demandeur(0)) itemFrom.IsSummary = True itemFrom.IsAuthors=True Set Principal=New notesitem(eventdoc,"Principal",doc.v_demandeur(0)) Principal.IsSummary = True Set AppointmentType=New notesitem(eventdoc,"AppointmentType","2") AppointmentType.IsSummary = True Set Repeats=New notesitem(eventdoc,"Repeats","") Repeats.IsSummary = True Set Ressources=New notesitem(eventdoc,"Ressources","") Ressources.IsSummary = True Ressources.IsNames = True Set RoomToReserve=New notesitem(eventdoc,"RoomToReserve","") RoomToReserve.IsSummary = True RoomToReserve.IsNames = True Set SaveOptions=New notesitem(eventdoc,"SaveOptions","") SaveOptions.IsSummary = True Set I_Body=New notesitem(eventdoc,"Body",doc.type_conge(0)) I_Body.IsEncrypted = True Set blindcopyto = New notesitem(eventdoc,"BlindCopyTo","") blindcopyto.IsSummary=True blindcopyto.IsNames=True Set EndDate = New notesitem(eventdoc,"EndDate",doc.EndDate(0)) EndDate.IsSummary=True Set EndTime = New notesitem(eventdoc,"EndTime",Cdat(doc.EndDate(0)+" 20:00:00")) EndTime.IsSummary=True Set EnterCopyTo = New notesitem(eventdoc,"EnterCopyTo","") EnterCopyTo.IsSummary=True EnterCopyTo.IsNames = True Set EnterBlindCopyTo = New notesitem(eventdoc,"EnterBlindCopyTo","") EnterBlindCopyTo.IsSummary=True EnterBlindCopyTo.IsNames=True Set EnterSendTo = New notesitem(eventdoc,"EnterSendTo","") EnterSendTo.IsSummary=True EnterSendTo.IsNames=True Dim nombre As Integer nombre%=doc.caldays(0) nombre% = nombre% - 1 Redim myList(nombre%) As Variant Dim verifDeb6 As New NotesDateTime ("") Set verifDeb6=New notesdatetime(doc.StartDate(0)) mylist(0)=Datevalue(doc.StartDate(0)) For counter% = 1 To nombre% Call verifDeb6.AdjustDay(1) mylist(counter%) =Datevalue(verifDeb6.dateonly) Next Set notesItem1 = New notesitem(eventdoc,"CalendarDateTime",mylist) notesitem1.IsSummary=True verifFin= doc.EndDate(0)+" 20:00:00" Dim dateTime4 As NotesDateTime Set dateTime4 = New NotesDateTime( "20:00:00") Set notesItem4 = New notesitem(eventdoc,"appendEndTime",dateTime4) notesItem4.IsSummary=True verifdeb=doc.StartDate(0) + " 04:00:00" Dim dateTime5 As NotesDateTime Set dateTime5 = New NotesDateTime( "04:00:00") Set notesItem5 = New notesitem(eventdoc,"appendStartTime",dateTime5) notesItem5.IsSummary = True verifFin= doc.EndDate(0)+" 20:00:00" Set date2 = New notesitem(eventdoc,"EndDateTime",Cdat(verifFin)) date2.IsSummary = True Set exclude=New notesitem(eventdoc,"ExcludeFromView","D") Call exclude.appendtotextlist("S") exclude.IsSummary = True Set ViewIcon = New NotesItem(eventdoc, "_ViewIcon", 9) ViewIcon.IsSummary = True Set ORGTABLE = New NotesItem(eventdoc, "ORGTABLE", "P0") ORGTABLE.IsSummary = True verifdeb=doc.StartDate(0)+" 04:00:00" Set StartDate = New NotesItem(eventdoc, "StartDate", Cdat(verifdeb)) StartDate.IsSummary = True Set StartDateTime = New NotesItem(eventdoc, "StartDateTime", Cdat(verifdeb)) StartDateTime.IsSummary = True Set Subject = New NotesItem(eventdoc, "Subject", "Congés") Subject.IsSummary = True Set AtlChair = New notesitem(eventdoc,"AltChair",doc.v_demandeur(0)) AtlChair.IsSummary=True Set Logo = New notesitem(eventdoc,"Logo","stdNotesLtr0") Logo.IsSummary=True Set MailFirstPass = New notesitem(eventdoc,"MailFirstPass","1") MailFirstPass.IsSummary=True Set MailOptions = New notesitem(eventdoc,"MailOptions","0") MailOptions.IsSummary=True Set Sequencenum = New notesitem(eventdoc,"Sequencenum",1) Sequencenum.IsSummary=True Set tmpNoActionBar = New notesitem(eventdoc,"tmpNoActionBar","") tmpNoActionBar.IsSummary=True Set tmpOEMClient = New notesitem(eventdoc,"tmpOEMClient","") tmpOEMClient.IsSummary=True Set Sign = New notesitem(eventdoc,"Sign","0") Sign.IsSummary=True Set StartTime = New notesitem(eventdoc,"StartTime",Cdat(doc.StartDate(0)+" 04:00:00")) StartTime.IsSummary=True Set tmpOwnerHW = New notesitem(eventdoc,"tmpOwnerHW","1") tmpOwnerHW.IsSummary=True Set WebCategory = New notesitem(eventdoc,"WebCategory","") WebCategory.IsSummary=True Set WebDateTimeInit = New notesitem(eventdoc,"WebDateTimeInit","1") WebDateTimeInit.IsSummary=True Call eventdoc.save(True,False) 'Print "envoi event" Call doc.replaceItemvalue("majagenda",1) Call doc.save(True,True) Set doc = nextdoc Wend End SubTous les champs ne sont pas obligatoires, à toi d'épuré à ta convenance.Sandrine[%sig%]
Bonne journée.
Sandrine
Avatar de l’utilisateur
sandrine
Maître-posteur
Maître-posteur
 
Message(s) : 431
Inscrit(e) le : 23 Déc 2004 à 09:10
Localisation : Gigondas

Re: RECUPERER DES DATES DANS L'AGENDA

Messagepar M@rcello » 03 Fév 2004 à 10:32

Merci je vais tester
M@rcello
 


Retour vers Développement

cron