Domino 9 und frühere Versionen > Entwicklung

newsletter Funktion klappt nicht

(1/5) > >>

Selin:
Hallo,

ich versuche die Newsletter Funktion anzuwenden. Habe mal das Beispiel aus der Hilfe genommen:

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", 2)
     Set news = New NotesNewsletter(dc)
     news.SubjectItemName = "Subject"
     news.DoSubject = True
     Set doc = news.FormatMsgWithDoclinks(db)
     Call doc.Send(True, "Marketing")
End Sub

Ichhabe eine Mail mit dem Body "text" Also müsste er mind. 1 Dokument finden.
Nach Ausführen kommt die Meldung, "Spezielles Datenbankobjekt nicht gefunden. Verweis auf meine Maildb"
Was mach ich falsch?

Driri:
Laß mal den Debugger mitlaufen und schau, wo genau die Meldung auftritt.

Selin:
ab hier:

Set doc = news.FormatMsgWithDoclinks(db)
Call doc.Send(True, "Marketing")

Driri:
Hi,

vermutlich liegts daran, daß Du für das doc keine Form bestimmst, im doc.Send aber angibst, daß die Form im Doc gespeichert werden soll.

Mach mal noch nen doc.Form = "Memo" vor das Send.

Selin:
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, "name")
End Sub

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln