Re: Utilize a table to tell where to email specified reports

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: A C (no_at_reply.please)
Date: 10/14/04


Date: Fri, 15 Oct 2004 12:45:58 +1300

Adding to Mr Stone's link, below are a couple of links to code for sending
email from Access.

http://www.mvps.org/access/general/gen0009.htm
http://www.granite.ab.ca/access/email.htm

If you already have written a macro which sends email and you like how it
works or wish to keep doing it using macros for the sending then what you
can do is use VBA to "build" and/or edit a macro on the fly, and then
execute that macro (execute it automatically from within VBA).
For example you may have an existing macro that emails a certain report(s)
to me@home.com and you@work.com . What you could do is edit that macro from
within VBA to adjust it to email to everyone in your table who needs that
report (and likewise you can also change which report it is that they get
emailed), and then execute that macro from within VBA. In your case your
VBA would loop around 4 times for each of the 4 reports, and within each
loop changing
1. the report that is going to be sent
2. which recipients will get it

This would be really useful particularly if your macro executes an existing
piece of emailing code that you dont know or care about and dont want to be
editing or moving or calling directly.

If you want to do this then reply and the access community will assist.

Regards
AC

"Frank Stone" <anonymous@discussions.microsoft.com> wrote in message
news:005a01c4b21d$c808c470$a501280a@phx.gbl...
> hi,
> see this site
> http://www.granite.ab.ca/access/email/recordsetloop.htm
> regards
> Frank
> >-----Original Message-----
> >I would like to be able to use a table to put email
> addresses in and specify
> >what reports I send to certain people. I would like to
> be able to build a
> >query and macros that would generate the reports and the
> selected reports to
> >the specified people in the table.
> >Email address Report 1 Report
> 2 Report 3
> > Report 4
> >John.Doe@email.net (yes)
> (no) (yes)
> > (yes)
> >Jane.Johns@email.net (no)
> (yes) (yes)
> > (yes)
> >Tom.Thomas@email.net (yes)
> (yes) (yes)
> > (yes)
> >Joe.Man@email.net (no)
> (no) (no)
> > (Yes)
> >
> >I would like to be able to send John Doe report 1, 3 and 4
> >Jane Report 2,3,4
> >Tom report 1,2,3,4
> >Joe report 4
> >
> >This to me makes more sense than building a macro for
> each report. It would
> >be easier to change the table than to go in and change 4
> macros.
> >.
> >



Relevant Pages

  • Re: PC Word Macro Not Working in Mac Word
    ... The Mac VBA Editor is a savagely-castrated shadow of the one in Word ... let the Macro Recorder write the bulk of the code for you. ... The "execute" seems to be ... Since, in VBA, we are running within the context of a single application, we ...
    (microsoft.public.mac.office.word)
  • Re: PC Word Macro Not Working in Mac Word
    ... I did a test macro with basically just the code you ... The Mac VBA Editor is a savagely-castrated shadow of the one in Word ... The "execute" seems to be ... Since, in VBA, we are running within the context of a single application, we ...
    (microsoft.public.mac.office.word)
  • Re: Date range on reports
    ... box to your report with a control source like: ... > In the Database window (Database window: The window that appears when you ... > In the New Form dialog box, click Design View, and click OK. ... > Begin by clicking Macro Names to display the Macro Name column. ...
    (microsoft.public.access.reports)
  • Re: Date range on reports
    ... Create an unbound form (unbound form or report: A form or report that isn't ... In the Database window (Database window: The window that appears when you ... In the New Form dialog box, click Design View, and click OK. ... Begin by clicking Macro Names to display the Macro Name column. ...
    (microsoft.public.access.reports)
  • Re: "Me" Macro
    ... What I am trying to do is to fax out only the invoices> that belong to that customer. ... When I take that filter out, it sends the> whole report out to each customer. ... Me is a shorthand way (in VBA, not in a macro) of>> referring to the object to which the module belongs. ...
    (microsoft.public.access.macros)