Hi, I am aware of sending email through VBA as an attachment in whatever format. But now i need to send email with report data being email body instead of an attachment.
You can get it to run from vba - I have integratyed it with LOtus Notes quite easily - what e-mail system are you using this code works with LOtus Notes
Private Sub documentopen()
Call SAVE
Dim Maildb As Object 'the mail database
Dim username As String
Dim maildbname As String
Dim maildoc As Object
Dim attachme As Object
Dim session As Object
Dim embedobject As Object
Dim mytime As String
Dim recipient As String
Dim subject As String
Dim attachment As String
Dim BodyText As String
Set Maildb = session.GETDATABASE("", maildbname)
If Maildb.ISOPEN = True Then
Else
Maildb.OPENMAIL
End If
Set maildoc = Maildb.CREATEDOCUMENT
maildoc.Form = "Memo"
maildoc.sendto = recipient
maildoc.subject = subject
maildoc.Body = BodyText
If attachment <> "" Then
Set attachme = maildoc.CREATERICHTEXTITEM("Attachment"
Set embedobject = attachme.embedobject(1454, "", attachment, "Attachment"
We cannot go for mail component due to budget constraints. We are using Outlook as the default email application. How to render the report content and put it into email body. I am able to send the report as an attachment.
I appreciate if you guys can throw some more light on this.
Yes, code has to be changed. As of now i am using BO SDK methods to generate an attachment. But how to capture the report data and display it as HTML int he email body.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.