GivenRandy
asked on
ShellExecute -- Printing Error -- Memory Problem ?
We are having a problem printing a certain document from Excel when it is shelled from VB6 (most documents print fine). If we run Excel and load the file separately, it prints fine (using Black Ice ColorPlus printer driver). However, launching Excel via ShellExecute causes an error. We aren't sure what is causing it, but the only thing that seems different is that it is run in a shell. It normally works fine, but could this be causing problems?
Function StartDoc(DocName As String) As Long
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
StartDoc = ShellExecute(Scr_hDC, "Open", DocName, "", "C:\", SW_SHOWNORMAL)
....
p.s., first part of error message:
Your file could not be printed due to an error on Black Ice ColorPlus on IcePortAD:. There are several possible reasons:
....
Function StartDoc(DocName As String) As Long
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
StartDoc = ShellExecute(Scr_hDC, "Open", DocName, "", "C:\", SW_SHOWNORMAL)
....
p.s., first part of error message:
Your file could not be printed due to an error on Black Ice ColorPlus on IcePortAD:. There are several possible reasons:
....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER