Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Redemption to email Access Reports

0 views
Skip to first unread message

BillB

unread,
Oct 5, 2004, 2:53:15 PM10/5/04
to
I received the following VBA code from dmi...@dimastr.com .

Question: How do I send an Access Reports to the email recipient using
Redemption? The Report could be an attachment or just the Email Message's
Body.

Thanks,

BillB

' = = = = = = = = = = = = =

Option Compare Database
Option Explicit

Sub DoIt()

Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
Dim myRecipient As Object
Dim myRecipients As Object

Set myOlApp = CreateObject("Outlook.Application")
Set NS = myOlApp.GetNamespace("MAPI")
NS.Logon
Set myItem = myOlApp.CreateItem(olMailItem)
Set sItem = CreateObject('Redemption.SafeMailItem")
sItem.Item = myItem
Set myRecipients = sItem.Recipients
myRecipients.Add ("Jug...@SomeEmailAddress.com")
myItem.Body = "Hello " & vbCrLf & "WORLD" & vbCrLf &
"Jug...@SomeEmailAddress.com"
sItem.Send
Set myOlApp = Nothing

End Sub

Dmitry Streblechenko (MVP)

unread,
Oct 5, 2004, 4:28:17 PM10/5/04
to
Use the Attachments collection to add an attachment:

myItem.Attachments.Add("c:\test.txt")

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"BillB" <please_reply@via_newsgro.up> wrote in message
news:v4C8d.4561$Vm1...@newsread3.news.atl.earthlink.net...

BillB

unread,
Oct 6, 2004, 2:02:36 PM10/6/04
to
Dmitry,
Looks good so far! I am creating an HTML file for the attachment and I need
to include some <IMG> images.

Any suggestions?

BillB


"Dmitry Streblechenko (MVP)" <dmi...@dimastr.com> wrote in message
news:enStZnxq...@TK2MSFTNGP10.phx.gbl...

Dmitry Streblechenko (MVP)

unread,
Oct 6, 2004, 2:51:08 PM10/6/04
to
You will need to refer to the images using the "cid:" source and set a
source id property on the attachment itself. See
http://www.dimastr.com/redemption/objects.htm#examples and scroll down to
"Create an HTML message with an embedded image"

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"BillB" <please_reply@via_newsgro.up> wrote in message

news:0rW8d.6389$Vm1....@newsread3.news.atl.earthlink.net...

BillB

unread,
Oct 8, 2004, 6:16:39 PM10/8/04
to
Once again you pulled me out of the darkness!

I see how to add a JPG and even use it more than once [in this case a
scanned in Signature.JPG] but I would also like to include a corporate logo
on the HTML. I'm not sure how to configure the

Attach.Fields(&H370E001E) = "image/jpeg"
and the
Attach.Fields(&H3712001E) = "myident"

to accept an additional <IMG src=cid:mySECONDident>.

Or do I only get one image per HTML?

Thanks again!

BillB
--------------------------------


"Dmitry Streblechenko (MVP)" <dmi...@dimastr.com> wrote in message

news:OsWgxV9...@TK2MSFTNGP11.phx.gbl...

Dmitry Streblechenko (MVP)

unread,
Oct 8, 2004, 6:28:39 PM10/8/04
to
No, you can have as many images as you want as long as cid's are different:

Attach1.Fields(&H3712001E) = "myident1"
Attach2.Fields(&H3712001E) = "myident2"
Attach3.Fields(&H3712001E) = "myident3"

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"BillB" <please_reply@via_newsgro.up> wrote in message

news:blE9d.12629$gs1....@newsread2.news.atl.earthlink.net...

BillB

unread,
Nov 11, 2004, 1:28:27 PM11/11/04
to
Dmitry,
I'm trying to send my emails out through FaxMail.com which wants Plain Text
attachments. Any suggestions?

Thank you,
BillB

"Dmitry Streblechenko (MVP)" <dmi...@dimastr.com> wrote in message

news:u7parYYr...@TK2MSFTNGP14.phx.gbl...

Dmitry Streblechenko (MVP)

unread,
Nov 12, 2004, 12:35:11 PM11/12/04
to
I am not sure what you mean. Do you mean they should be just regular
attachments?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"BillB" <please_reply@via_newsgro.up> wrote in message

news:fbOkd.8079$_J2....@newsread2.news.atl.earthlink.net...

0 new messages