![]() |
Office Automation - 2000
I am not a VBA programmer but by recording macros and doing a little
research in Knowledge Base on Microsoft.com, I have managed to do the following Open an Excel 2000 spread sheet with the master file of names, dates & places using a macro Using the same macro to open Word 2000 and calling a macro in Word that inserts names, dates, places from the Excelfile into a form letter in Word. Then the macro in Word 2000 sends the letter to print. Control returns to Excel and the macro closes the Word Application and document, ie, WordApp.Quit savechanges:=wdDoNotSaveChanges Set WordApp = Nothing Problem is, macro is faster than the print command and with the Printer Status Box open, I see the document spooling, then it disappears (result=no printed page) as control comes from the Word macro back to the Excel macro and Word closes. I have monkeyed around with DoEvents and with a timer but I have not come up with anything very clean. Any ideas? Thanks, Anasazi Andy |
Office Automation - 2000
Word is probably doing a background print. Set it to do a foreground print.
Tools=Options in Word I would guess (and probably can be done in code as well) -- Regards, Tom Ogilvy wrote in message ups.com... I am not a VBA programmer but by recording macros and doing a little research in Knowledge Base on Microsoft.com, I have managed to do the following Open an Excel 2000 spread sheet with the master file of names, dates & places using a macro Using the same macro to open Word 2000 and calling a macro in Word that inserts names, dates, places from the Excelfile into a form letter in Word. Then the macro in Word 2000 sends the letter to print. Control returns to Excel and the macro closes the Word Application and document, ie, WordApp.Quit savechanges:=wdDoNotSaveChanges Set WordApp = Nothing Problem is, macro is faster than the print command and with the Printer Status Box open, I see the document spooling, then it disappears (result=no printed page) as control comes from the Word macro back to the Excel macro and Word closes. I have monkeyed around with DoEvents and with a timer but I have not come up with anything very clean. Any ideas? Thanks, Anasazi Andy |
All times are GMT +1. The time now is 04:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com