Cesar
-- bruce (sqlwork.com)
"Cesar K. San Jose" <cksa...@hotmail.com> wrote in message
news:OSbzoehpCHA.2252@TK2MSFTNGP12...
--
G
"Cesar K. San Jose" <cksa...@hotmail.com> wrote in message news:OSbzoehpCHA.2252@TK2MSFTNGP12...
Refer to: StartDocPrinter, data format for PDF , word etc ?? 12/19/2002
11:?? PM ( check with the Subject its not exactly the same and i cn't see it
right now, i had just posted it)
I am also working on similar kind o project. where i am calling a DLL from
WebPage which executes ShellExecute() to print my Word , PDf or text
documents etc to Network Printer or Fax Printer. But Acrobat reader doen't
close by itself after printing, so i have do something more (Please refer to
my previous and current discussion in new group on 12/17 and 12/19) to check
for its jobid , to get it i get all before printing jobs list and after
printing job list , and compare it to get the last jobid and wait for it to
complete and then close the acrobat reader.
"Cesar K. San Jose" <cksa...@hotmail.com> wrote in message
news:OSbzoehpCHA.2252@TK2MSFTNGP12...
Private Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (ByVal hdc
As Long, lpdi As DOCINFO) As Long
Private Declare Function StartPage Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function EndPage Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function EndDoc Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function ShellExecute2 Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String,
_
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd
As Long) As Long
Private Sub cmdPrint_Click()
Dim Pt(1 To 2) As POINTAPI
Dim bTypes(1 To 2) As Byte
Dim DI As DOCINFO
Dim lngHDC As Long
DI.cbSize = Len(DI)
DI.lpszDocName = "Visual Basic - Step by Step"
DI.lpszOutput = vbNullString
DI.lpszDatatype = vbNullString
lngHDC = Printer.hdc
Call StartDoc(lngHDC, DI)
Call StartPage(lngHDC)
If ShellExecute2(lngHDC, "PRINT", "C:\testpdf.pdf", "", "C:\", 1) <= 32
Then
MsgBox "true"
End If
Call EndPage(Printer.hdc)
Call EndDoc(Printer.hdc)
End Sub
"Cesar K. San Jose" <cksa...@hotmail.com> wrote in message
news:OSbzoehpCHA.2252@TK2MSFTNGP12...
Mark McWhirter
ma...@ccwnresources.com
mangled e-mail: /cc/c/
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!