Domino 9 und frühere Versionen > Entwicklung
newsletter Funktion klappt nicht
klaussal:
aus der designer-hilfe:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim newsletter As NotesNewsletter
Dim doc As NotesDocument
Dim j As Integer
Dim originalDoc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedFTSearch( "botany", 0 )
Set newsletter = New NotesNewsletter( collection )
newsletter.DoScore = True
newsletter.DoSubject = True
newsletter.SubjectItemName = "Topic"
Set doc = newsletter.FormatMsgWithDoclinks( db )
doc.Subject = "New botany documents from this week"
doc.Form = "Memo"
Call doc.Send( False, "Susanna Tallan" )
' mark all documents in newsletter's collection as
' processed, so that they aren't included in the
' newsletter next time
For j = 1 To collection.Count
Set originalDoc = collection.GetNthDocument( j )
Call session.UpdateProcessedDoc( originalDoc )
Next
End Sub
Selin:
auch hier bekomm ich die Meldung "Spezielles Datenbankobjekt nicht gefunden. Verweis auf meine Maildb"
Driri:
--- Zitat von: Selin am 15.03.04 - 15:40:44 ---hmm, wnen ich das so mache kommt die Meldung "Object variable not set"
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim news As NotesNewsletter
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Call db.UpdateFTIndex(True)
Set dc = db.FTSearch("test", 1)
Set news = New NotesNewsletter(dc)
news.SubjectItemName = "Subject"
news.DoSubject = True
doc.Form = "Memo"
Set doc = news.FormatMsgWithDoclinks(db)
Call doc.Send(True, "Alev Oezer/FRA/DIEHL-AVIONIK")
End Sub
--- Ende Zitat ---
Also das doc.Form = "Memo" muß hinter das Set doc=...
Du hast ja sonst noch gar kein doc, wie soll da Form gesetzt werden.
Ist denn in der DocCollection überhaupt was drin oder ist die evtl. leer ?
Selin:
wenn ich es danach setze kommt die Meldung, die ich am Anfang hatte
in der NotesDocCollection wird ein Dokument gefunden
koehlerbv:
Gibt es in Deiner Datenbank eine Vorgabeansicht ? MailSend macht doch immer Ärger, wenn keine Vorgabeansicht definiert wurde ...
Bernhard
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln