Results 1 to 6 of 6

Thread: [RESOLVED] Auto email from access

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651

    Resolved [RESOLVED] Auto email from access

    I need to write a macro within microsoft access which will run one of my predefined reports & then email it.

    I have the report set up within access.

    How can i write a macro to send the report and auto email.

    I'm using access 2000 and i also can use access 2003.

    thanks
    Gilly

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Auto email from access

    Access VBA question moved to Office Development

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Auto email from access

    docmd.SendObject acSendReport,"ReportName", acFormat....,To,CC,BCC,Subject, Message, etc....
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651

    Re: Auto email from access

    Thanks Static - do i use public function first?
    Gilly

  5. #5
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Auto email from access

    No, you'd put that in a sub, not a function, unless you maybe wanted to return a boolean value indicating success or failure, or in the click event of a button. Or, call the function from the click eventShouldn't be public unless called from more than one spot. The function could take ReportName, to, cc, subject, etc, as arguments to make it more generic.
    You could do it in a macro, but I suggest avoiding macros like the plague.
    Tengo mas preguntas que contestas

  6. #6
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Auto email from access

    agreed.. NO MACROS unless u have to!! (or if u need a startup macro)
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width