Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Everything seems to work extremely well ... except that I would like to keep
the Word application hidden. I have inserted : WD.Application.ScreenUpdating = False WD.Application.Visible = False prior to the line which opens the document (see below) But after the printer dialog box is closed the Word application pops up during the printing process I would like to prevent this happening ... Have you any suggestions ........................ Dim WD As Object Set WD = CreateObject("Word.Application") WD.Application.DisplayAlerts = wdAlertsNone WD.Application.ScreenUpdating = False ' ......... This is probably superfluous WD.Application.Visible = False WD.Documents.Open (ThisWorkbook.Path & "\PrivList Labels.doc") If WD.ActiveDocument.MailMerge.State < wdMainAndDataSource Then WD.ActiveDocument.MailMerge.OpenDataSource _ Name:=ThisWorkbook.Path & "\PrivList.csv", _ LinkToSource:=True End If WD.ActiveDocument.MailMerge.Destination = wdSendToPrinter WD.ActiveDocument.MailMerge.Execute WD.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges WD.Application.DisplayAlerts = wdAlertsAll WD.Quit SaveChanges:=wdDoNotSaveChanges Set WD = Nothing ........................................... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automation code | Excel Discussion (Misc queries) | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming | |||
Need HELP to modify code (need more automation) | Excel Programming | |||
Unknown where is the problem on the Runtime error - Automation error | Excel Programming |