Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Excel 2000 & windows nt 4, sp6.
I'm using Excel to extract label info to a 'prn' file, then opening a Word doc & merging 'prn' info, then printing the merged document. Works great - except that when I attempt to close the word object, I get a message that Word is printing & closing will stop the printing. Don't want that to happen, but I also want to close Word from within Excel. My question is: Is there a way to execute a loop to determine when the print job has finished? Where do I put the loop? Or this a needless worry? Thanks - mike Code: Dim wordApp As Object Set wordApp = CreateObject("Word.Application") With wordApp .Documents.Open Filename:="1.doc", _ (formatting code) .Application.PrintOut Filename:="1.doc", _ .activeDocument.Close End With wordApp.Quit |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sendkeys(keys,wait) how do I use wait | Excel Discussion (Misc queries) | |||
Re-show userform after closing file - code help | Excel Discussion (Misc queries) | |||
How to code on Macro on saving and closing a file? | Excel Worksheet Functions | |||
Resume.xlw and closing workbook with VBA code. | Excel Discussion (Misc queries) | |||
Closing the VBA Editor using code | Excel Worksheet Functions |