Hello again
I’ve had a request to reduce someone’s work load…. This entails providing an automated report producing facility. The current reports are a combination of Word (I can do this bit) and Excel. I’m struggling with Excel automation.
I have a query that provides the right data for the workbook to graph, I can sort it out by using QueryDef to give me the data I want. What I’m having real difficulty in understanding is the method of getting the data from the query into Excel. I’m slightly familiar with DAO, but not at all with ADO (the book I have with an example is using ADO). The query will produce 7 columns of data, with an unknown number of rows, potentially up to 300.
Once I’ve got the basic code sorted I then need to cycle through a table of contacts (a Do ….. While will sort this, I hope) to send the Excel workbook and the Word document to around 35 different people. I’m reasonably happy with the Outlook bit, having used it a few times with Word.
If anyone can point me at the commands I need to know in the Excel object model (DAO please, pretty please) I’ll almost certainly be able to get this to work. At the moment I’m a bit like a hungry guy in the jungle, losts of pretty looking berries, but!!!!!!!
If it’s easier, I’d be prepared to use the TransferSpreadSheet command and then format the resulting workbook with automation. At the moment this looks a simpler option to me, but am I digging a big hole for myself?
Thanks for reading this.
Ian