Wrox Programmer Forums
|
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 July 18th, 2003, 02:08 PM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Auto Emails From Access

Building an approval routing system in access to send invoices to approvers for them to approve/reject/re-submit. Would like to know a better way to automatically send emails to the approver selected. Mail system is Notes and using SendObject puts me in the new message mode of Notes where it is still necessary to 'send' the email. What is the best way to send an auto message to whichever approver is chosen for that particular invoice? Thank you!

 
Old July 18th, 2003, 04:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Congratulations on getting so far!

Personally, I think the Lotus Notes object model is so badly documented, I'm suprised anyone gets anywhere with it.

To get further you need to abandon the SendObject command and do one of the following:
  • Investigate the Lotus Notes API and see if you can get it to do what you need.
  • Pay for an add-in that uses SMTP to send email without using your users default mail client. The latest, but not neccesarily the best, I've seen is from FMS and can be found here:http://www.fmsinc.com/products/emailer/index.asp


Brian Skelton
Braxis Computer Services Ltd.
 
Old August 22nd, 2003, 01:19 PM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Brian:
I'm developing an Access 2002/Outlook 2002 database for my small business in the WindowsXP environment.
I'm trying to use Automation to output merge fields from the current record in my Access db to an Outlook email and automatically populate the To: and Subject: fields of the email. I've found code that creates a MergeToWord() function which creates the word doc from a Word template with bookmarks and merges the fields with the Word bookmarks. It works great. I've also found code that will automatically create a new mail message from an Outlook template (.oft), populate the recipient and enter the subject line. Now I want to combine these two steps. From Access I want to click a button which will create a new Outlook mail message, populate the recipient and subject fields, merge the current record into the text of the message. I want the email to be in Word doc format, not an attachment to an email.

Kind of complicated... Any help would be greatly appreciated.
Chris

 
Old September 7th, 2003, 09:20 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by CLindsey
 Brian:
I'm developing an Access 2002/Outlook 2002 database for my small business in the WindowsXP environment.
I'm trying to use Automation to output merge fields from the current record in my Access db to an Outlook email and automatically populate the To: and Subject: fields of the email. I've found code that creates a MergeToWord() function which creates the word doc from a Word template with bookmarks and merges the fields with the Word bookmarks. It works great. I've also found code that will automatically create a new mail message from an Outlook template (.oft), populate the recipient and enter the subject line. Now I want to combine these two steps. From Access I want to click a button which will create a new Outlook mail message, populate the recipient and subject fields, merge the current record into the text of the message. I want the email to be in Word doc format, not an attachment to an email.

Kind of complicated... Any help would be greatly appreciated.
Chris

Patrci Hubbard
 
Old September 7th, 2003, 09:26 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Chris
    I am unable to help with your problem. However, I am trying to send a e-mail from an access 2000 report and using the send to option of the file menu. I appear to be only able the send the e-mail as HTML of RFT. In both of these options I lose the Ruled Formatting from the report. I would like to be able to send the report as an e-mail as an embedded .doc or at leat to be able to reatin the rulled format of the access report. It sounds af If you MergerToWord() function may help. Can you tell me where I can source this code please.
Any help greatly appreciated.
Regards,
Pat
Quote:
quote:Originally posted by CLindsey
 Brian:
I'm developing an Access 2002/Outlook 2002 database for my small business in the WindowsXP environment.
I'm trying to use Automation to output merge fields from the current record in my Access db to an Outlook email and automatically populate the To: and Subject: fields of the email. I've found code that creates a MergeToWord() function which creates the word doc from a Word template with bookmarks and merges the fields with the Word bookmarks. It works great. I've also found code that will automatically create a new mail message from an Outlook template (.oft), populate the recipient and enter the subject line. Now I want to combine these two steps. From Access I want to click a button which will create a new Outlook mail message, populate the recipient and subject fields, merge the current record into the text of the message. I want the email to be in Word doc format, not an attachment to an email.

Kind of complicated... Any help would be greatly appreciated.
Chris

Patrci Hubbard
 
Old September 7th, 2003, 09:52 AM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the code I use to create e-mails in VBA. Set a reference to outlook.


Private Sub cmdSendEmail_Click()

    'Don't forget to set a reference to the Outlook object library 8.0
    'Use the Object browser to see the exposed objects.
    Dim MailApp As Outlook.Application
    Dim NewEmail As MailItem
    Set MailApp = CreateObject("Outlook.Application")
    Set NewEmail = MailApp.CreateItem(olMailItem)
    With NewEmail
        'This is the e-mail address I use for students
        .To = "[email protected]"
        .Subject = "This is an Access Generated Email"
        .Body = "Mike:" & Chr(13) _
                & "This message was generated by an " & Chr(13) _
                & "access event." & Chr(13) _
                & "What do you think?" & Chr(13) _
                & "It uses the exposed objects of outlook" & Chr(13) _
                & "to create and send the message."
        .Send
        End With
    Set NewEmail = Nothing
    Set MailApp = Nothing

End Sub
 
Old April 6th, 2006, 08:14 PM
Registered User
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

did you ever resolve this issue?

Quote:
quote:Originally posted by SparrowCathy
 Building an approval routing system in access to send invoices to approvers for them to approve/reject/re-submit. Would like to know a better way to automatically send emails to the approver selected. Mail system is Notes and using SendObject puts me in the new message mode of Notes where it is still necessary to 'send' the email. What is the best way to send an auto message to whichever approver is chosen for that particular invoice? Thank you!






Similar Threads
Thread Thread Starter Forum Replies Last Post
ACCESS : Auto incrementing date rashidaa Access 2 November 21st, 2007 08:36 AM
Access locks up after multiple emails sent Paulsh Access VBA 2 December 30th, 2005 03:20 PM
Sending automatic emails in Access marcin2k Access VBA 10 March 6th, 2005 03:48 PM
auto function in access tables leeegglestone Access 0 August 12th, 2004 04:46 AM
HTML content in Outlook Emails generated by Access Justine Access VBA 0 January 13th, 2004 04:47 PM





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