Re: Emailing report data
- From: "Alex Dybenko" <alexdyb@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 3 Sep 2006 09:02:04 +0400
HTML format - yes, you can, but in this case you have to create Outlook message using outlook object library and built message body there. Have a look at www.outlookcode.com for sample code
--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
"Lateral" <Lateral@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:4C687DE2-C9B0-44F3-B89F-9C05CE7D2E11@xxxxxxxxxxxxxxxx
Hi Alex
I managed to get it working and need to look at the formating so that the
data is displayed neatly in the body of the email. Is there any way to get
the data in HTML format?
Regards
Greg
"Alex Dybenko" wrote:
Just create a new module, paste this sub there and call it from, say,
command button click event of a form
--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
"Lateral" <Lateral@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD1A7CD1-B179-4C53-9E05-C1948F86BF32@xxxxxxxxxxxxxxxx
> Thanks Alex!
>
> What is the best way to implement this?
>
> Regards
> Greg
>
> "Alex Dybenko" wrote:
>
>> Hi,
>> should work now, anyway - here it is:
>> Public Sub olSendRpt(strTo As String, strBody As String, strSubject As
>> String, strReportName As String)
>> 'A procedure to send report in a body of mail message
>> 'Alex Dybenko, http://Alex.Dybenko.com
>>
>> 'Usage: olSendRpt "Send@xxxxxx", "Pls see report below", "My Report",
>> "Report1"
>>
>>
>> Dim strFileName As String, intFile As Integer, strLine As String,
>> strTemplate As String
>>
>> strFileName = Environ("Temp") & "\rep_temp.txt"
>>
>> If Len(Dir(strFileName)) > 0 Then
>> Kill strFileName
>> End If
>> DoCmd.OutputTo acOutputReport, strReportName, acFormatTXT, strFileName
>>
>> intFile = FreeFile
>> Open strFileName For Input As #intFile
>> Do While Not EOF(intFile)
>> Line Input #intFile, strLine
>> strTemplate = strTemplate & vbCrLf & strLine
>> Loop
>> Close #intFile
>>
>> DoCmd.SendObject acSendNoObject, "", acFormatTXT, strTo, , , >> strSubject,
>> strBody & strTemplate
>>
>> End Sub
>>
>> -- >> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://alexdyb.blogspot.com
>> http://www.PointLtd.com
>>
>> "Lateral" <Lateral@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:505A982E-DEBA-490A-95CB-77C0D711FD9A@xxxxxxxxxxxxxxxx
>> > Hi Alex
>> >
>> > Thanks for the link but unfortunately it does not work...can you >> > please
>> > check and reissue the link?
>> >
>> > Thanks a lot.
>> >
>> > Regards
>> > Greg
>> >
>> > "Alex Dybenko" wrote:
>> >
>> >> Hi,
>> >> here a sample code:
>> >> http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71
>> >>
>> >> -- >> >> Best regards,
>> >> ___________
>> >> Alex Dybenko (MVP)
>> >> http://alexdyb.blogspot.com
>> >> http://www.PointLtd.com
>> >>
>> >> "Lateral" <Lateral@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >> news:AF41D044-08FB-4F3A-9851-D0D740E0E6A3@xxxxxxxxxxxxxxxx
>> >> > Hi guys
>> >> >
>> >> > I am using the Issue database template from Microsoft and are >> >> > making
>> >> > some
>> >> > enhancements.
>> >> >
>> >> > I want to be able to generate an email and have the body of the
>> >> > contain the report data.
>> >> >
>> >> > I can create attachments ok but I really want to be able to >> >> > "merge"
>> >> > the
>> >> > report into the body of the actual email.
>> >> >
>> >> > Any help is appreciated.
>> >> >
>> >> > Regards
>> >> > Greg
>> >>
>> >>
>>
>>
.
- Follow-Ups:
- Re: Emailing report data
- From: Lateral
- Re: Emailing report data
- References:
- Re: Emailing report data
- From: Alex Dybenko
- Re: Emailing report data
- From: Lateral
- Re: Emailing report data
- From: Alex Dybenko
- Re: Emailing report data
- From: Lateral
- Re: Emailing report data
- Prev by Date: Re: Variables from Table
- Next by Date: Re: checking for correct Chr in string
- Previous by thread: Re: Emailing report data
- Next by thread: Re: Emailing report data
- Index(es):