The below code walks a view and sends Newsletter e-mails to the userseverything works well except, I can not get the Title to show where it shows the link and title
Does anyone know what I am doing wrong for the title not to show?
Dim s As New NotesSession
Set db = s.CurrentDatabase
Set lkView = db.GetView ("LKEMail Profiles" )
Set lkDoc = lkView.GetDocumentByKey ("Nag1")
Set View = db.GetView("LKNag1")
Set doc = view.GetFirstDocument
While Not (doc Is Nothing )
If(doc.sent(0) = "")Then
strWho = "AS400_File_Admin"
sUserName = s.UserName
'Define Search
f2$ = "FIELD ODCRTU = " & doc.ODCRTU(0)
Set nlCollection = db.FTSearch( f2$, 0)
'Set up Newsletter
Set newsletter = New NotesNewsletter( nlCollection )
newsletter.DoScore = False
newsletter.DoSubject = True
newsletter.SubjectItemName = doc.ODOBNM(0)
'Send e-mail Newsletter
Set eDoc = newsletter.FormatMsgWithDoclinks( db )
'Alter who the E-Mail is comming from
Principle = strWho
eDoc.Principal = Principle
eDoc.From = Principal
eDoc.AltFrom = Principle
eDoc.SendFrom = Principle
eDoc.INetFrom = Principle
eDoc.tmpDisplaySentBy = Principle
eDoc.tmpDisplayFrom_Preview = Principle
eDoc.DisplaySent = Principle
Set Item = New NotesItem(eDoc, "Form", "Memo")
Set Item = New NotesItem(eDoc, "SendTo", sUserName)
Set Item = New NotesItem(eDoc, "CopyTo", "")
Set Item = New NotesItem(eDoc, "BlindCopyTo", "")
Item.IsSummary = True
Set Item = New NotesItem(eDoc, "Subject", lkDoc.epSubject(0) + " from " + doc.ODCRTU(0))
Item.IsSummary = True
Call eDoc.Send( False)
'Set doc field Sent to “Sent” so that agent does not send double newsletters
Set nlDoc = nlCollection.GetFirstDocument
While Not (nlDoc Is Nothing )
nlDoc.sent = "Sent"
Call nlDoc.save(True,False)
Set nlDoc = nlCollection.GetNextDocument(nlDoc)
Wend
End If
Set doc = view.GetNextDocument(doc)
Wend