Results 1 to 11 of 11
  1. #1
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69

    Email Access report

    Hai,

    I want to email access 2010 reports through outlook 2007. Basically these are the quotations to different clients. I do have email address of receipients in the database, even in the report I am sending. How do I send it automatically without re-typing the email address again when the outlook opens. I do have a command button (with Emaildatabaseobject function) which send the report in PDF format through Outlook. It works fine, but it opens Outlook and I have to re-type the email address in address field, then it will go. I just want Outlook to capture the email address automatically from the email field of my database. Is that possible in Access 2010? Your valuable advise is highly appreciated.

    Thank you and best regards
    Last edited by rkalapura; 07-25-2012 at 04:49 AM. Reason: To give more explanation of my problem

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    If the data is on a form, you can simply refer to the appropriate form control to get it for your email code:

    Me.EmailAddress

    If not, you can either use DLookup() or open a recordset to get the address. Lots of email info here:

    http://www.granite.ab.ca/access/email.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69
    Thanks for your reply. Sorry I could not solve my problem. You said I can use Dlookup() in outlook? How do I mention it in the To: or CC: or BCC field of Outlook?

    I have a command button with "Emaildatabaseobject" command, which open the Outlook and attach access report in PDF format. It waits until I type-in the email address in To: field. If I type the email address and press send, email goes to the party, the report as a PDF attachment. My question is how can I fill the To: area automatically from my access database email field. My Quote table has a field "Emailid", which stores email address of our clients. My command button is in the form and I tried with complete field reference ([Forms]![Quote]![Emailid]) directly in to the To: in Outlook, but it is not taking.

    I really appreciate your help

    Best regards and God Bless You

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Generally here's the syntax:

    http://access.mvps.org/access/general/gen0018.htm

    You haven't shown your email code, but you should be able to populate any of the address fields. I'd add that VBA code is more flexible than macros. This is easy to do in VBA.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69
    Thank you Paul for your help. Can you please tell me how can I attach a snap shot of my Command Button Macro in this post?
    Best regards

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Save it in jpg format, they attach in the Advanced reply area.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69

    Emailing Access Report Automatically

    Snap shot attached

    Thanks
    Click image for larger version. 

Name:	EmailMacro.jpg 
Views:	42 
Size:	71.1 KB 
ID:	8618

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    And what happens if you put that form reference in the To field? You get an error, or it doesn't fill it in, or?

    Switching that to VBA would be pretty simple and the form reference definitely works there.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69

    Email Access Report through Outlook

    Quote Originally Posted by pbaldy View Post
    And what happens if you put that form reference in the To field? You get an error, or it doesn't fill it in, or?

    Switching that to VBA would be pretty simple and the form reference definitely works there.
    Thanks Paul for your reply. Now it is happending like this:

    If I give an email address directly in to the To: field, in the Macro, the report goes to the party. But when I give a form reference there, Outlook open and wait until we type in a email address. This is what I want to avoid.

    If switching to VBA is easy, could you please send me the code?

    Thank you and best regards

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  11. #11
    LukeChung-FMS is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Vienna, Virginia
    Posts
    7
    Given the difficulty you are encoutering, take a look at our Total Access Emailer program that's a Microsoft Access addin that will do what you're seeking: http://www.fmsinc.com/MicrosoftAccess/Email.asp

    It'll take a list of contacts and let you send personalized emails using data from your tables, and attaching reports in PDF that are automatically filtered for each recipient. You don't have to do any programming if you don't want to. The add-in lets you create and save an unlimited number of email blasts. Just click on the one you want when you want to resend it with the latest data. You can use a table or query for your datasource (list of emails) so you can have it use your latest data or pending items.

    A free demo is available here: http://www.fmsinc.com/MicrosoftAcces...ree-trial.html

    FYI, the professional version has a VBA library interface so you can tie email blasts to an event, macro, or your other code. Hope this helps.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Email with Access report as attachment
    By kmims44 in forum Programming
    Replies: 1
    Last Post: 07-18-2012, 02:38 PM
  2. Replies: 6
    Last Post: 06-26-2012, 12:16 PM
  3. Sending Report from Access as attachment in Email
    By taimysho0 in forum Programming
    Replies: 16
    Last Post: 02-09-2012, 12:07 PM
  4. Auto email a pdf report daily from ACCESS
    By wsm_al in forum Access
    Replies: 7
    Last Post: 10-20-2011, 09:35 AM
  5. Replies: 4
    Last Post: 04-13-2011, 10:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums