Hi I have written code to output a report and add to lotus notes and send.
The only problem is that when the report output rich text, so i lose all the details like checkboxes, field boxes, logo etc.
I have used the following code.
Code: ( vb )
Public Function SendNotesMail()
the line in question is 51. I have tried acFormatTXT and acFormatDOC and acFormatRTF in each functions i lose all my boxes etc any help please as the report looks garbage. I know there is a way round this as other firms use access to send automated reports, but i cant figure it out. I have tried microsoft who say tough titties and i googled it hundred of times help me please
The only problem is that when the report output rich text, so i lose all the details like checkboxes, field boxes, logo etc.
I have used the following code.
Code: ( vb )
Public Function SendNotesMail()
Code:
Dim strDocName As String strDocName = mailing_list DoCmd.OpenQuery "query1" DoCmd.OpenQuery "query2" 'Set up the objects required for Automation into lotus notes 'Set dbs = CurrentDb Dim rst As Object Dim rat As Object Dim Maildb As Object 'The mail database Dim UserName As String 'The current users notes name Dim MailDbName As String 'THe current users notes mail database name Dim MailDoc As Object 'The mail document itself Dim AttachME As Object 'The attachment richtextfile object Dim Session As Object 'The notes session Dim EmbedObj As Object 'The embedded object (Attachment) Dim copyTo(250) As Variant ' Set rst = CurrentDb.OpenRecordset("mailing_list") With rst .MoveFirst 'go to the first record strAddress = .Fields(1).Value .MoveNext 'get all subsequent addresses and separate each with a semi-colon strBcc = strAddress Do While .EOF = False strAddress = .Fields(1).Value '*** Replace "EMailAddress" with the name of your field strBcc = strBcc & ", " & strAddress .MoveNext Loop End With Set rat = CurrentDb.OpenRecordset("email_detail_table") With rat .MoveFirst 'go to the first record strsbj1 = .Fields(0).Value strsbj2 = .Fields(1).Value strsbj3 = .Fields(2).Value strsbj4 = .Fields(3).Value strsbj5 = .Fields(4).Value strsbjM = "POL" & strsbj1 & " " & strsbj2 & " " & strsbj3 & " " & strsbj4 End With DoCmd.OutputTo acOutputReport, "current_form_report", acFormatTXT, "S:\BSM\System Operations Team\Live Service Team\OCP Information\POL OCP\" & "POL" & strsbj1 & ".doc", False 'Start a session to notes Set Session = CreateObject("Notes.NotesSession")
Comment