Sounds like you need to export to text and read that file
into VB or some other programming language. In VB here's what I would do:
In the report:
the first line of each page must contain some unique string
to identify that it is the first line
paste this into a VB module:
'-------------------------------------------
Option Explicit
Public olapp As Object
Sub main()
Dim strLine As String
Dim strMsg As String
Dim strTo As String
Dim lngMailCtr As Long
Dim f As Integer
'assuming you will send through MS-Outlook
'you should add MS-Outlook also in the project references
Set olapp = CreateObject("Outlook.Application"
f = FreeFile(0)
'change this path to your file location / name
Open "c:\report.txt" For Input As #f
strMsg = ""
strLine = ""
lngMailCtr = 0
Do While Not EOF(f)
Line Input #f, strLine 'get a record from the report
'I'm going to assume that the unique string is
'E-MAIL ID: and nothing else is on the line after it
'that way I have the id to mail it!
If InStr(strLine, "E-MAIL ID:"

Then 'are we on a new page
'extract the e-mail address
strTo = Trim$(Mid$(strLine, InStr(strLine, "E-MAIL ID:"

+ 11))
If strMsg > "" Then
'try to mail the message
lngMailCtr = lngMailCtr + mailMsg(strTo, strMsg)
End If
strMsg = strLine & vbCrLf 'start a new one
Else
'add to the one we already have
strMsg = strMsg & strLine & vbCrLf
End If
Loop
'catch the last one, that didn't get done
'because we hit eof
If strMsg > "" Then
'try to mail the message
lngMailCtr = lngMailCtr + mailMsg(strTo, strMsg)
End If
MsgBox lngMailCtr & " e-mails sent!"
Close #f
End Sub
'this assumes you will send the mail via MS-Outlook
Function mailMsg(t As String, s As String) As Integer
On Error GoTo Err_NoMail
Call SendMailThruMSOutLook("Invoice", t, s)
mailMsg = 1 ' true
Exit Function
Err_NoMail:
mailMsg = 0 ' false
End Function
'this assumes you will send the mail via MS-Outlook
Public Sub SendMailThruMSOutLook(strSub As String, strTo As String, strBody As String)
Dim oitem As Object
On Error GoTo Err_Handler
Set oitem = olapp.CreateItem(0)
With oitem
.Subject = strSub
.To = strTo
.Body = strBody
.Send
End With
Exit Sub
Err_Handler:
MsgBox Err & " - " & Error, vbInformation, "Warning"
End Sub
'-------------------------------------------
NOTE:
This is quite crude, but it's a start, I didn't test
it completely because my Outlook is messed up at the
moment, but I've done something similiar before.
Good Luck!