This post contains attachments v20030804175507.zip 
Summary
Automating batch jobs using VBA, XML, ADO, Excel, Visual basic. Requirement Visual Basic, Outlook, Excel 2000,ADO.
Hi,
In one of my application I saw my team members were manually firing SQL Queries (using Oracle, doesn't matter you can use any other database), copying the data into Excel and then send emails to people through outlook Beauty of this code you can generate any number of different reports, each report you can email to different people by having different set of nodes in DailyParam.XML File.
I automated this whole process using Visual basic, VBA, Excel. Beauty of this code is you can It consists of following files:
The DailyParam.XML: This file explains the whole process like what values you need to supply in nodes.
SQL.XML where you would place your SQL Query/Stored procedure name.
pjDailyreports.VBP: Visual basic code that gets parameters from DailyParam.XML file. You can prepare .EXE and put in window scheduler to run at times you want.
Good luck and let me know if it made your life easy. It made mine easy.
|