Automation question

  • Thread starter Thread starter Razor
  • Start date Start date
R

Razor

Hi,

I have a report that is launched via a form.

The report has three totals in its footer.

How would I use Automation to do the following:

1. access the totals in the report footer,
2. perform some simple math on each total
3. insert the final numbers into bookmarks on a Word
template file (.dot)

Also, could someone point me to any explanatory materials
on Office automation, particularly on pushing data from
Access to Word.

Thanks a lot!

Regards,
Razor
 
I would recommend not pulling the data out of the report,
but rather querying the database directly with VBA and SQL
to get the totals. That takes care of extracting the
report totals, if you just get them out of the data
directly.

If you need to tweak the totals in the report, those are
just formulas. You can change the formulas in the report.

As far as inserting them into a bookmark in a word
document, it's rather easy. I don't have any sample code
handy, but do a google search for "VBA createobject word"
and you should get some decent code snippets.
 
Back
Top