Paul
In general, works the same way as in Word 2000. To open an Excel file from Word2003, do the following
1) Create a macro by selecting Tools-Macro-Macros, creating a new macro. Call it ReadExcelFile, as an example
2) Add a reference to the Microsoft Excel nn.n Object Library. In the Visual Basic Editor, select Tools-References. Find the Microsoft Excel nn.n Object Library reference and check the check box
3) In the General Declarations section of your code module, paste the following
Dim objExcel As Excel.Applicatio
Dim objWRK As Excel.Workboo
4) In the macro, paste the following code, to open the file C:\testexcel.xls
On Error Resume Nex
Set objExcel = GetObject(, "Excel.Application"
If objExcel Is Nothing The
Set objExcel = New Excel.Applicatio
End I
Set objWRK = objExcel.Workbooks.Open("C:\testexcel.xls"
objExcel.Visible = Tru
5) Run the macro.
There are other techniques, such as embedding an Excel spreadsheet in Word. If that is what you have in mind, please email me (
[email protected]
Hope this helps
Ir