R
Raph
Hi,
I have a very particular problem but wasn't able to find a solution so
far.
Every day, we merge the content of a directory which contains from 50
to 500 Word documents (.doc files) into a single document. After that
we apply OMR codes to the document so that the documents can be packed
into envelopes by a machine.
Last year when we migrated to windows 7 and Office 2010 I started to
get an odd behaviour in the procedure. From time to time when printing
the merged document, the logo would disappear in the paper version of
the merged document. When opening the document on the PC, the logo
would be there.
I don't know if that's a known problem (haven't found anything on
this). We also suspected the drivers, but we were able to witness this
problem on 2 different printer models (same brand though) with 2
distinct drivers each (Win 7 certified drivers).
Here is a portion of the code I use. Note that I added calls to
sApiSleep in order to try to circumvent the disappearing logo problem
but alas to no avail.
---------------------------------------------------------------------------------------------------------------------------------------------
ActiveDocument.Close
Call sapiSleep(5000)
Documents.Open L_MyPath & "out_merged\" & "Merged" & "_" & L_strMyDate
& "_" & L_strMyTime & ".doc"
Call sapiSleep(10000)
Application.ActivePrinter = L_Printer
Call sapiSleep(5000)
'Tried True as well as False as a Parameter for backrground printing.
ActiveDocument.PrintOut True
ActiveDocument.Close
FileCopy L_MyPath & "out_merged\" & "Merged" & "_" & L_strMyDate & "_"
& L_strMyTime & ".doc", L_MyPath & "out_printed\" & "Merged" & "_" &
L_strMyDate & "_" & L_strMyTime & ".doc"
Kill L_MyPath & "out_merged\" & "Merged" & "_" & L_strMyDate & "_" &
L_strMyTime & ".doc"
Kill (L_MyPath & "Merge.doc")
Application.Visible = True
Application.ActivePrinter = MyPrinter
Any ideas would be very appreciated.
Raph.
I have a very particular problem but wasn't able to find a solution so
far.
Every day, we merge the content of a directory which contains from 50
to 500 Word documents (.doc files) into a single document. After that
we apply OMR codes to the document so that the documents can be packed
into envelopes by a machine.
Last year when we migrated to windows 7 and Office 2010 I started to
get an odd behaviour in the procedure. From time to time when printing
the merged document, the logo would disappear in the paper version of
the merged document. When opening the document on the PC, the logo
would be there.
I don't know if that's a known problem (haven't found anything on
this). We also suspected the drivers, but we were able to witness this
problem on 2 different printer models (same brand though) with 2
distinct drivers each (Win 7 certified drivers).
Here is a portion of the code I use. Note that I added calls to
sApiSleep in order to try to circumvent the disappearing logo problem
but alas to no avail.
---------------------------------------------------------------------------------------------------------------------------------------------
ActiveDocument.Close
Call sapiSleep(5000)
Documents.Open L_MyPath & "out_merged\" & "Merged" & "_" & L_strMyDate
& "_" & L_strMyTime & ".doc"
Call sapiSleep(10000)
Application.ActivePrinter = L_Printer
Call sapiSleep(5000)
'Tried True as well as False as a Parameter for backrground printing.
ActiveDocument.PrintOut True
ActiveDocument.Close
FileCopy L_MyPath & "out_merged\" & "Merged" & "_" & L_strMyDate & "_"
& L_strMyTime & ".doc", L_MyPath & "out_printed\" & "Merged" & "_" &
L_strMyDate & "_" & L_strMyTime & ".doc"
Kill L_MyPath & "out_merged\" & "Merged" & "_" & L_strMyDate & "_" &
L_strMyTime & ".doc"
Kill (L_MyPath & "Merge.doc")
Application.Visible = True
Application.ActivePrinter = MyPrinter
Any ideas would be very appreciated.
Raph.