SELECT
Form,
tmpRW,
tmpOwnerHW,
tmpParticipantHW,
tmpNoActionBar,
_ExpandGroups,
Logo,
ClientSupportsAltName,
NamePreference,
LanguagePreference,
SaveOptions,
MailOptions,
"Sign",
Encrypt,
"From",
tmpOEMClient,
tmpDuration,
LocalTimeZone,
_FromPreferredLanguage,
ApptUNID,
OnlinePlace,
_LangChair,
AltChair,
AppointmentType,
_ParticipantSwitcher,
_OnlineSwitcher,
_BorderColor,
_WatchedItems,
_AllowEncryptedEdit,
tmpAdditionalInviteeButton,
tmpAdditionalRoomsButton,
tmpHideTimeZone,
tmpEventLabel,
tmpRepeatConflictDates,
DispDuration,
tmpAppointmentType,
tmpAppointmentType_1,
Alarms,
OrgConfidential,
BookFreeTime,
Subject,
StartDate_2,
StartTime_2,
EndDate_2,
DispDur_2,
StartDate,
StartTime,
EndDate,
EndTime,
dispDuration_1,
StartDate_1,
StartTime_1,
EndDate_1,
DispDur_1,
tmpShowTZ,
StartTimeZone,
EndTimeZone,
tmpStartTime_Local,
Repeats,
dispRepeats,
tmpRequiredAttendees,
tmpOptionalAttendees,
tmpFYIAttendees,
EnterSendTo,
EnterCopyTo,
EnterBlindCopyTo,
tmpChair,
tmpOrganizer,
OrganizerInclude,
tmpSentBy,
Location,
tmpRooms,
tmpResources,
RoomToReserve,
Resources,
OnlineMeeting,
dispOnlineMeeting,
MeetingType,
dispMeetingType,
Presenters,
OnlineLocation,
OnlinePlaceToReserve,
tmpOnlinePlace,
AudioVideoFlags,
SendAttachments,
WhiteBoardContent,
Categories,
SchedulerSwitcher,
dispBodyDocLink,
Body,
Notes
FROM "Appointment"
kann ich in VB per COM Mails in die Datenbank schreiben, Kontakte schreiben und updaten, Termine setzen und Aufgaben erstellen?
edit: geht es denn auch irgendwie, ein Lotus Script über COM abzusetzen?
Dim domSession As New Domino.NotesSession
Dim domDatabase As New Domino.NotesDatabase
Dim domDocument As NotesDocument
Dim domViewEntry As NotesViewEntry
Dim domView As NotesView
Dim domViewNav As NotesViewNavigator
Dim strName As String
domSession.Initialize
Set domDatabase = domSession.GetDatabase("", "names.nsf")
Set domView = domDatabase.GetView("Kontakte")
Set domViewNav = domView.CreateViewNav
Set domViewEntry = domViewNav.GetFirstDocument()
Set domDocument = domViewEntry.Document
strName = domDocument.GetItemValue("FullName")(0)
MsgBox strName
...
• Notice that we used the New keyword when declaring NotesSession.
With COM, NotesSession is the only class which allows the New
keyword. Because of this, you will have to work through the other
methods and properties available to you that return Domino objects. For
example, instead of:
Dim db As New NotesDatabase(“server”,“filename”)
Dim name As New NotesName( “first last/ou/o” )
Dim doc As New NotesDocument(db)
Use:
Dim db As NotesDatabase
Set db = session.GetDatabase(“server”,“filename”)
Dim name As NotesName
Set name = session.CreateName(“first last/ou/o” )
Dim doc As NotesDocument
Set doc = db.CreateDocument
• COM access to Domino is only available for the Domino back-end
classes. It does not support any of the front end or user interface classes,
which include Button, Field, Navigator, NotesTimer, NotesUIDatabase,
NotesUIDocument, NotesUIView, NotesUIWorkspace.
• COM does support handling items as extended properties. An easy way
to access a database item in LS is by treating it as a NotesDocument
property. For example, the following LS sets the value of the Subject
item on a document to “Hello”:
doc.Subject = “Hello”
You cannot do this in VB. You have to code it like this:
doc.ReplaceItemValue( “Subject”,“Hello” )
and instead of using this line to get the content of the Address field:
doc.Address(0)
use this line in Visual Basic:
doc.GetItemValue(“Address”)(0)
While Not (domDoc Is Nothing)
strName = domDoc.GetItemValue("lastname")(0) & " " & domDoc.GetItemValue("firstname")(0) & " " & domDoc.GetItemValue("shortname")(0) & " - " & domDoc.GetItemValue("fullname")(0)
MsgBox strName, vbInformation, "Datensatz Nr. " & intIndex
Call domDoc.ReplaceItemValue("FullName", "Test 1234567")
Call domDoc.Save(True, True)
Set domDoc = domView.GetNextDocument(domDoc)
intIndex = intIndex + 1
Wend
Set domNewDoc = domDb.CreateDocument
Call domNewDoc.ReplaceItemValue("FirstName", "hans")
Call domNewDoc.ReplaceItemValue("ShortName", "hansi")
Call domNewDoc.ReplaceItemValue("LastName", "müller")
Call domNewDoc.ReplaceItemValue("FullName", "hans müller")
Call domNewDoc.Save(True, True)