Scripting between MS Word and MS Excel

The_Moves

Limp Gawd
Joined
Oct 8, 2008
Messages
183
I want to create a script where and update Excel Spreadsheet Graph is automatically placed inside a Word document.

Basically, i have to run a report on multiple servers related to Processor Time, Disk Space, and Memory Utilization. I follow this process:

1) Open the Excel Spreadsheet taht contains the data and the Graph of the update. Presently i have it where the spreadsheet automatically updates when opened. The update is done through a database connection.

2) I then copy the updated graph into a Word document, which will sit alongside a description of the server and any changes that have been made to it.

3) Repeat the process for 60 or so servers, soon to by a lot more....

I want to script that. Its not a hard task, just tedious. I've already tried a method where the Excel spreadsheet is essentially embedded into the Word doc, however the Word doc grew to over 100 meg - which cannot be sent out in an email.

Does anyone know of a way to script this?
 
Does anyone know of a way to script this?
It's a fairly straightforward VBA task.

You could start out with a list of Word docs and corresponding Excel docs in a file. The VBA script (from Excel or Word) opens each file, copies the chart as a bitmap from the Excel document (Activate the chart, then CopyPicture) and pastes it into the Word document (a named bookmark would make this easy). Save and exit the Word document and close the Excel file. Easy.

You can look up how to do the individual actions on google. There's plenty of pre-written VBA code on different sites. I would write some myself, but like you say, it's tedious and i'm getting ready to go home. :p
 
Back
Top