Skip to main content
REMINDER: On December 1, 2018, this forum will be closed to new posts and responses. After that date, you will still be able to view and search the forum. New discussions should take place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

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

Notes/Domino 6 and 7 Forum



Sign in to participate PreviousPrevious NextNext

RE: Creating Invitations using Visual Basic - please help!
Youri Autier 22.Apr.04 03:47 AM a Web browser
General All Releases All Platforms

Here is a function that I created in one of my notes applications to create a
document of the meeting invitation type. It works fine on R5 and I think It
successfully passed my tests on 6,5 as well.

u>Notes </u>]
I do not know what half of the fields are for but some of them must exist;
others don't and I just don't know which ones are mandatory.
I deleted some additional code which are not relevant for the invitation itself
so you may see some declarations of variables that are not used.

Good luck.

Function MakeMeetingInvitation(docCur As NotesDocument, nmUserChair As
notesName , nmUserFrom As notesname, _
nmUserTo As NotesName) As NotesDocument
'This function creates a meeting invitation
Dim s As New notessession
Dim db As NotesDatabase
Dim docSession As NotesDocument
Dim docInvitation As notesdocument

Dim vrnStartDate As Variant
Dim vrnEndDate As Variant
Dim vrnStartTime As Variant
Dim vrnEndTime As Variant
Dim strLocation As String, strSessionInfo As String

Set db = docCur.parentDatabase
'Getting information from Session sDocument
Set docSession = GetParentDocument(db, docCur.ParentDocumentUNID)

If Not docSession Is Nothing Then
strLocation = docSession.Session_Loc(0)
strSessionInfo = docSession.Session_Subject(0)
End If

'Set nmUser = New NotesName (s.Username)
Set nmUserFrom = New NotesName("Learning&Education")

'it is not necessary to use variable but it makes it easier to debug
vrnStartDate = Datevalue(docCur.Session_StartDate(0))
vrnEndDate = Datevalue(docCur.Session_EndDate(0))
vrnStartTime = Timevalue(docCur.Session_StartTime(0))
vrnEndTime = Timevalue(docCur.Session_EndTime(0))

Set docInvitation = db.createDocument

docInvitation.Form = "Notice"
docInvitation.~_ViewIcon = 133
docInvitation.~$PublicAccess = "1"
docInvitation.AppointmentType = "3"
docInvitation.AltChair = nmUserFrom.Abbreviated
docInvitation.AltRequiredNames = nmUserTo .Abbreviated
docInvitation.AltSendTo = nmUserTo.canonical + "@EMEA-BE"

'Chair cannot be the same as User and UserFrom or the accept buttons
will not be visible. it cannot be empty either
docInvitation.Chair = nmUserChair.canonical

docInvitation.Location = strLocation
docInvitation.NoticeType = "I"
docInvitation.PostedDate = Now
docInvitation.Principal = nmUserFrom.canonical
docInvitation.RequiredAttendees = nmUserTo.abbreviated + "@EMEA-BE"
docInvitation.Subject = "Invitation : " + docCur.Course_Name(0)
docInvitation.SendTo =nmUserTo.canonical

docInvitation.StartDate = vrnStartDate + vrnStartTime
docInvitation.StartDateTime = vrnStartDate + vrnStartTime
docInvitation.StartTime = vrnStartDate + vrnStartTime
docInvitation.EndDate = vrnEndDate + vrnEndTime
docInvitation.EndDateTime = vrnEndDate + vrnEndTime
docInvitation.EndTime = vrnEndDate + vrnEndTime

docInvitation.Topic = docCur.Course_Name(0)

Dim strarrCSTrack(1) As String
strarrCSTrack(0) = "InitEventDescriptorFromNewNote by Notes Client on "
+ nmUserFrom.Abbreviated + "(" & Trim(s.NotesVersion) & ") at " & Cstr(Now)
strarrCSTrack(1) = "SendPrimaryMeetingRequest by Notes Client on " +
nmUserFrom.Abbreviated + "(" & Trim(s.NotesVersion) & ") at " & Cstr(Now)

docInvitation.~$Alarm = 1
docInvitation.~$AlarmOffset = -30
docInvitation.~$AltPrincipal = nmUserFrom.canonical
docInvitation.~$CSTrack = strarrCSTrack
docInvitation.~$CSVersion = "2"
docInvitation.~$ExpandGroups = "3"
docInvitation.~$LangChair = ""
docInvitation.~$LangPrincipal = ""
docInvitation.~$Mailer = "Lotus Notes " + Strleft(s.notesVersion, "|",
1) + " " + Trim(Strright(s.notesVersion, "|", 1))
docInvitation.~$NameLanguageTags = "en"
docInvitation.~$NoPurge = vrnStartDate + vrnStartTime
docInvitation.~$StorageTo = "1"
docInvitation.~$StorageCc = ""
docInvitation.~$SMTPKeepNotesItems = "1"
docInvitation.~$WebFlags = "J"

Dim itemSign As NotesItem
Set itemSign = New NotesItem(docInvitation, "Sign", "0")

docInvitation.Alarms = "1"
docInvitation.AltCopyTo = ""
docInvitation.APPTUNID = docInvitation.universalID
docInvitation.BookFreeTime = ""
docInvitation.CopyTo = ""
docInvitation.FromCategories = ""
docInvitation.INetSendTo = "."
docInvitation.INetCopyTo = ""
docInvitation.INetRequiredNames = "."
docInvitation.Logo = "stdNotesLtr0"
docInvitation.MailFirstPass = "1"
docInvitation.MAILOPTIONS = ""
docInvitation.OrgConfidential = ""
docInvitation.Repeats = ""
docInvitation.RoomToReserve = ""
docInvitation.Resources = ""
docInvitation.SequenceNum = 1
docInvitation.StorageRequiredNames = "1"
docInvitation.WebDateTimeInit = "1"

'No Counter proposal + No responses
docInvitation.Broadcast = "1"
'docInvitation.PreventCounter = "1"
Set MakeMeetingInvitation = docInvitation

End Function

Creating Invitations using Visual B... (Andrew McNab 21.Apr.04)
. . RE: Creating Invitations using Visu... (Joe Nelson 21.Apr.04)
. . RE: Creating Invitations using Visu... (Youri Autier 22.Apr.04)

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
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools

RSS Feeds

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


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


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