Use VB in Excel to close open Word Document
Hi, new to all this.
Using Visual Basic I have managed to get Excel to open up a word document, add some data to it from an Excel workbook, save and print it off, I am just looking for a way of closing the document back down again using VBscript. I have tried using .Close to no nocicable results and the help wizard suggests ..appWd.Quit which the debugger does not like. Any ideas? Thanks in advance. |
Use VB in Excel to close open Word Document
Hi just to update.
I have worked out what the debugger error is on the .Quit command. I am trying to close Word whilst it is still printing the document. Any ideas of what I need to add in to allow Word to finish printing before closing. Thanks Gary "Gary" wrote: Hi, new to all this. Using Visual Basic I have managed to get Excel to open up a word document, add some data to it from an Excel workbook, save and print it off, I am just looking for a way of closing the document back down again using VBscript. I have tried using .Close to no nocicable results and the help wizard suggests .appWd.Quit which the debugger does not like. Any ideas? Thanks in advance. |
Use VB in Excel to close open Word Document
have it print in the foreground.
-- Regards, Tom Ogilvy "Gary" wrote in message ... Hi just to update. I have worked out what the debugger error is on the .Quit command. I am trying to close Word whilst it is still printing the document. Any ideas of what I need to add in to allow Word to finish printing before closing. Thanks Gary "Gary" wrote: Hi, new to all this. Using Visual Basic I have managed to get Excel to open up a word document, add some data to it from an Excel workbook, save and print it off, I am just looking for a way of closing the document back down again using VBscript. I have tried using .Close to no nocicable results and the help wizard suggests .appWd.Quit which the debugger does not like. Any ideas? Thanks in advance. |
All times are GMT +1. The time now is 11:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com