R
Richard Horrocks
I am trying build a service that scans directories and
prints available Word documents in VB 6.0. Obviously this
requires no gui interaction at all. Currently I create the
word object using GetObject and use the following code to
open the word document
pWordApp.Application.Visible = False
pWordApp.ScreenUpdating = False
pWordApp.Application.WindowState =
wdWindowStateMinimize
pWordApp.DisplayAlerts = wdAlertsNone
pWordApp.Documents.Open fileName:=curFilePath
pWordApp.Visible = False
All fine and dandy BUT despite this on one document a pop-
up still trys to appear and locks the service. In debug I
trapped it (very difficult, it flashes on and off the
screen very fast) and it says "Now printing body
of 'docname' on 'printername' with a cancel button.
So, what am I doing wrong? why is this particular box not
surpressed? Should I take some other approach?
Richard
prints available Word documents in VB 6.0. Obviously this
requires no gui interaction at all. Currently I create the
word object using GetObject and use the following code to
open the word document
pWordApp.Application.Visible = False
pWordApp.ScreenUpdating = False
pWordApp.Application.WindowState =
wdWindowStateMinimize
pWordApp.DisplayAlerts = wdAlertsNone
pWordApp.Documents.Open fileName:=curFilePath
pWordApp.Visible = False
All fine and dandy BUT despite this on one document a pop-
up still trys to appear and locks the service. In debug I
trapped it (very difficult, it flashes on and off the
screen very fast) and it says "Now printing body
of 'docname' on 'printername' with a cancel button.
So, what am I doing wrong? why is this particular box not
surpressed? Should I take some other approach?
Richard