Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2007, 04:27 PM
Registered User
 
Join Date: Jul 2003
Location: Monroe, CT, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Emailing From MS Access 2000

I maybe a little behind the curve but.. As of now I am generating emails in 2000 but have not upgraded because of the warning msgbox which comes up everytime you try and send an email. Have they found away to shut this off? is it a none issue in 2003?
Thanks
Bill

 
Old January 10th, 2007, 05:52 PM
Registered User
 
Join Date: Jan 2007
Location: overland park, ks, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I overcame this by loading some freeware called Express ClickYES on my computer. There is a pro version but you have to pay for it... here is the web site... good luck.. John

http://www.contextmagic.com/express-clickyes/

 
Old January 11th, 2007, 04:56 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Do a search for the Redemption.dll, it will remove the dialog box for no cost.
 
Old January 25th, 2007, 06:59 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've tried using the Redemption.dll (v4.3.0.604) and each time the code executes Access 2000 (9.0.6926) SP3 crashes.

Code:
Public Function SendMail(m_RecipEmail As String, m_Subject As String, m_Note As String, Optional m_QryTbl As String)
 
Dim olAPP
Dim olNamespace
Dim stpEmail
Dim oItem

Set olAPP = CreateObject("Outlook.Application")
Set olNamespace = olAPP.GetNamespace("MAPI")
olNamespace.Logon
 
Set stpEmail = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
Set oItem = olAPP.CreateItem(0) 'Create a new message
 
With stpEmail
    .Item = oItem 'Set Item property
    .Recipients.Add "recipient@hotmail.com" 'm_RecipEmail
    .Recipients.ResolveAll
    .Subject = m_Subject
    .Importance = olImportanceNormal 'Normal importance
    .Body = m_Note
    .Send
End With
 
'Clean Up
Set oItem = Nothing
Set stpEmail = Nothing
Set olNamespace = Nothing
Set olAPP = Nothing
 
End Function
The code is being called from a simple command button on a form. If I put a break point in the code and step through it the code executes through to the end, but as soon as the Function ends, Access crashes. I'm stuck :(, does anyone have any clue what is going on ?
Thanks

Richard
 
Old February 18th, 2007, 05:43 AM
Registered User
 
Join Date: Oct 2006
Location: Leigh, Lancashire, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Richard,
Don't know if yopu ever sovled this puzzle but I think I have found the answer. Please let me know if it works for you

Public Function SendMail()

Dim olAPP As Object
Dim olNamespace As Object
Dim stpEmail
Dim oItem

Set stpEmail = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
Set olAPP = CreateObject("Outlook.Application")
Set olNamespace = olAPP.GetNamespace("MAPI")
olNamespace.Logon

Set oItem = olAPP.CreateItem(0) 'Create a new message

With oItem
    .Recipients.Add "anyuser@anymail.com" 'm_RecipEmail
    .Recipients.ResolveAll
    .Subject = "m_Subject"
    .Importance = olImportanceNormal 'Normal importance
    .Body = "m_Note"
    .Send
End With

'Clean Up

stpEmail.Item = oItem

Set oItem = Nothing
olNamespace.Logoff
Set olNamespace = Nothing
Set olAPP = Nothing
Set stpEmail = Nothing
End Function

This does not close access down anymore

 
Old October 13th, 2007, 09:58 AM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm having a similar problem. I've been kicking at it for two days now and am at my wits end. Can anyone help install redemption in this?

=====================

Sub SendMessages(Optional AttachmentPath)

  Dim MyDB As Database
  Dim MyRS As Recordset
  Dim objOutlook As Outlook.Application
  Dim objOutlookMsg As Outlook.MailItem
  Dim objOutlookRecip As Outlook.recipient
  Dim objOutlookAttach As Outlook.Attachment
  Dim TheAddress As String
  Dim strBody As String
  Dim strSubject As String
  Dim olItem As Outlook.MailItem

strSubject = "SUBJECT"
'*create string with email address
strBody = strBody & "BLAH BLAH BLAH" & Chr(13) & Chr(13)

'***creates and sends email

  Set MyDB = CurrentDb
  Set MyRS = MyDB.OpenRecordset("newsletter")
  MyRS.MoveFirst


  ' Create the Outlook session.
  Set objOutlook = CreateObject("Outlook.Application")

  Do Until MyRS.EOF
  ' Create the e-mail message.
  Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
  TheAddress = MyRS![Email]


     With objOutlookMsg
        ' Add the To recipients to the e-mail message.
        Set objOutlookRecip = .Recipients.Add(TheAddress)
        objOutlookRecip.type = olTo

        ' Add the Cc recipients to the e-mail message.
        'If (IsNull(Forms!frmMail!CCAddress)) Then
        'Else
        ' Set objOutlookRecip = .Recipients.Add(Forms!frmMail!CCAddress)
        ' objOutlookRecip.Type = olCC
        'End If

        ' Set the Subject, the Body, and the Importance of the e-mail message.
        .subject = strSubject
        .Body = strBody
        '.Importance = olImportanceHigh 'High importance

        'Add the attachment to the e-mail message.
        If Not IsMissing(AttachmentPath) Then
           Set objOutlookAttach = .Attachments.Add(AttachmentPath)
        End If

        ' Resolve the name of each Recipient.
        For Each objOutlookRecip In .Recipients
           objOutlookRecip.Resolve
           If Not objOutlookRecip.Resolve Then
             objOutlookMsg.Display
           End If
        Next
        .Send
      End With
      MyRS.MoveNext
   Loop
   Set objOutlookMsg = Nothing
   Set objOutlook = Nothing
End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database migration MS Access 2003 to MS SQL 2000 ayazhoda SQL Server 2000 3 April 23rd, 2007 11:38 AM
Need to change MS Access 2000 Query gilgalbiblewheel Classic ASP Databases 0 June 13th, 2005 11:10 PM
MS Access 2000 kvidy Access 12 June 10th, 2005 10:36 AM
MS Access 2000 Replication ppenn Access 0 February 3rd, 2005 04:27 PM
Emailing from MS Access using vba and outlook katd007 Access VBA 0 July 8th, 2004 12:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.