Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel vba macro that does a Word mail merge. If the
resulting document gets over a few pages in size, the printer prints some of the pages, then throws out an error page that is pretty meaningless dump of junk and stops printing. (I am guess it is from some sort of over run of data in the buffer ?). If I modify the vba code to send the resulting document to a new Word document, then print that document from Word, it prints just fine. Any idea why this happens? Does this method of printing do something different than printing right from Word ? Here is the code: Dim oWord As Word.Application Dim oMainDoc As Word.Document Dim oOutputDoc As Word.Document Dim omm As Word.MailMerge Set oWord = CreateObject("Word.Application") Set oDoc = oWord.Documents.Open("p:\carbboom online system\onlineorders.doc") Set omm = oDoc.MailMerge With omm .DataSource.FirstRecord = wddefaultfirstrecord .DataSource.LastRecord = wdDefaultLastRecord .Destination = wdSendToPrinter .Execute Pause:=False End With Set oOutputDoc = Nothing Set omm = Nothing oDoc.Close Set oDoc = Nothing oWord.Quit Set oWord = Nothing |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
merge two excel files like in word mail merge | Excel Discussion (Misc queries) | |||
Word, Excel and PowerPoint look for my printer before they open, w | Excel Discussion (Misc queries) | |||
Trying to merge from excel to word. New names won't merge | Excel Worksheet Functions | |||
Cell 255 Character - Error Mail merge to MS word. | Excel Discussion (Misc queries) | |||
Excel PageSetup Error even when a printer Exists | Excel Programming |