[AccessD] re: Using Outlook Redemption in Access

Joe Rojas JRojas at tnco-inc.com
Thu Jun 30 08:06:59 CDT 2005


Hello,

I do use Redemption but I use it for creating and assigning tasks.
The problem with your code is that "Application" is a reserved word in
Access. Access already has an object named Application.

I would rename your "Application" variable to something like OutApplication
and then try it.

JR


-----Original Message-----
From: Christopher Hawkins [mailto:clh at christopherhawkins.com]
Sent: Wednesday, June 29, 2005 7:43 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] re: Using Outlook Redemption in Access


Wait, I sent the wrong code snippet.  here is the one I am using:

[code]
Private Sub Blah()
Dim SafeItem, oItem 

    Set Application = CreateObject("Outlook.Application")
    Set Namespace = Application.GetNamespace("MAPI")
    Namespace.Logon 

    Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an
instance of Redemption.SafeMailItem
    Set oItem = Application.CreateItem(0) 'Create a new message
   
    SafeItem.Item = oItem 'set Item property
    SafeItem.Recipients.Add "clh at christopherhawkins.com"
    SafeItem.Recipients.ResolveAll
    SafeItem.Subject = "Testing Redemption"
    SafeItem.Send
End Sub
[/code]

Alright, NOW you can tell me what you think.  :)

-C-

----------------------------------------

From: "Christopher Hawkins" <clh at christopherhawkins.com>
Sent: Wednesday, June 29, 2005 5:39 PM
To: accessd at databaseadvisors.com
Subject: Using Outlook Redemption in Access

If you've ever made an Access app that sends eMail, you might be familiar
with Outlook Redemption (http://www.dimastr.com/redemption/).  It is a set
of COM components that allow you to bypass that messy Outlook dialog that
reads "A program is trying to automatically send e-mail on your behalf.  Do
you want to allow this?" blah blah blah.

I just downloaded Redemption and am unab;e to get it to work.  I'm hoping
that someone who has successfully implemented it can help me here.

I am using code straight from the Redemption site
(http://www.dimastr.com/redemption/objects.htm):

[CODE]
Private Sub Blah()
Dim SafeItem, oItem 

    Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an
instance of Redemption.SafeMailItem
    Set oItem = Application.CreateItem(0) 'Create a new message
   
    SafeItem.Item = oItem 'set Item property
    SafeItem.Recipients.Add "clh at christopherhawkins.com"
    SafeItem.Recipients.ResolveAll
    SafeItem.Subject = "Testing Redemption"
    SafeItem.Send
End Sub
[/CODE]

This code is triggered form a button click on a form.

When I run the code, I get an error message:

"Method or data member not found"

The error is on the .CreateItem method in the line that sets oItem to a new
item.

I've double-checked that the Redemption dll is registered, and I've made
sure it is referenced in the Access file.  I suspect that there is some
simple aspect of setup that I'm overlooking.

Anybody ever have this same issue?

-C-

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



This electronic transmission is strictly confidential to TNCO, Inc. and
intended solely for the addressee. It may contain information which is
covered by legal, professional, or other privileges. If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy, or take any action in reliance on this
transmission. If you have received this transmission in error, please notify
the sender as soon as possible and destroy this message. While TNCO, Inc.
uses virus protection, the recipient should check this email and any
attachments for the presence of viruses. TNCO, Inc. accepts no liability for
any damage caused by any virus transmitted by this email.



More information about the AccessD mailing list