Quinn
05-02-2006, 09:11 AM
I am using Word VBA to get information from a document,
then open an instance of Excel, and then add more information,
then create a new Word document that is a seriers of tables.
I use this code to open the Excel:
open new Excel workbook
On Error Resume Next
Set XlApp = GetObject(, "Excel.Application")
If XlApp Is Nothing Then
Set XlApp = CreateObject("Excel.Application")
If XlApp Is Nothing Then
MsgBox "Could not start Excel"
End
End If
End If
which seems to work, although when I close Excel it keeps a version somewhere in memory, and will use the old version, even after I modify the code somewhat. How do I get rid of that old Excel?
2nd) as I wrote above I am going Word=> Excel => Word
I have a form for the first instance of Word. How do I keep that form and have it appear in the Excel spreadsheet?
Thanks
Quinn
then open an instance of Excel, and then add more information,
then create a new Word document that is a seriers of tables.
I use this code to open the Excel:
open new Excel workbook
On Error Resume Next
Set XlApp = GetObject(, "Excel.Application")
If XlApp Is Nothing Then
Set XlApp = CreateObject("Excel.Application")
If XlApp Is Nothing Then
MsgBox "Could not start Excel"
End
End If
End If
which seems to work, although when I close Excel it keeps a version somewhere in memory, and will use the old version, even after I modify the code somewhat. How do I get rid of that old Excel?
2nd) as I wrote above I am going Word=> Excel => Word
I have a form for the first instance of Word. How do I keep that form and have it appear in the Excel spreadsheet?
Thanks
Quinn