|
-
May 4th, 2004, 12:07 PM
#1
ShellExecute "print" Question
Hi there,
I know this was asked b4 but i never found the answer..
I am trying to print a lot of files from my program and the code is more or less:
for i = 0 to totalreport
Call ShellExecute(Me.hWnd, "print", p_ReportFileName, "", "", 0)
next i
I know ShellExecute send it to the default printer, but i was wondering if there is any way i could show the printer dialog box to the user for him to choose what printer to use?
Thanks in advance
---------------------------------------------
Sure i got it... what s a form again?
-
May 4th, 2004, 10:58 PM
#2
why don't you show a print dialog before calling the shellexecute to print ?
-
May 5th, 2004, 01:04 AM
#3
Use the common dialog control to pick your printer before you go into the loop, and use printer.print to print the doc rather than shellexecute.
Be nice to Harley riders...
-
May 5th, 2004, 03:54 PM
#4
Thanks for your help but i still have a problem. When i try to print the pdf file, it takes a long time to upload some data to the printer (name Microsoft Visual Basic) then it hangs till i quit the program, and i get a 'Printer Error'
I am doing something wrong?
---------------------------------------------
Sure i got it... what s a form again?
-
May 5th, 2004, 05:01 PM
#5
If you're using Printer.Print, make sure you use Printer.EndDoc after it, otherwise the printer & the program think there is still more coming.
Be nice to Harley riders...
-
May 6th, 2004, 09:43 AM
#6
I've been trying to find info how to use this better but I don't find it..
Yes i knew about the enddoc stuff, I understand how u send text directly to the printer with
printer.print 'hello world"
enddoc
I understand how to print a picture, but i can't get to make this work with pdf.. Would you happen to have a exemple?
Thank for the help
---------------------------------------------
Sure i got it... what s a form again?
-
May 6th, 2004, 05:14 PM
#7
Sorry - I don't have any code for this here or at home - I did this at my last job and it seemed to work fine.
Be nice to Harley riders...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|