Hello Could you let me know how do I call the print dialog box in vba CorelDraw X6, I am trying to use it in a macro, It will be helpful if I can specify the printer and the page range to be printed so it opens with all setting ready to hit print.
Thank you in advance.
Jose
Thank you so much Mek! I just could not figure this one out by myself. Thanks a lot!
You are welcome!
Have a nice weekend!
Hi Mek, Not sure what could be happening here.
When I run the macro, everything works and the print dialog box pops up with the specified properties, the problem is that I click print and it just doesn't print. I tried different printers, even the Adobe PDF option to print to a file, I tried a different computer in a different place and it did the same thing. I realize that if I go to the print preview window and print from there then it prints. Do you mind testing this yourself on your computer, just to check if the problem is my Corel?
Thanks, Jose
Original quiestion was how to call print dialogue
Code in first post updated by line
ActiveDocument.PrintOut
Thanks Mek!. It works..
Hi Mek, sorry to bother you again. The only problem with this is that if the user cancels the print dialog box, the printing will happen anyway. Do you know any workaround?
Sub Macro1()With ActiveDocument.PrintSettings .SelectPrinter "Adobe PDF" .Copies = 3 .PrintRange = prnPageRange .PageRange = "2-4" End Withpr = ActiveDocument.PrintSettings.ShowDialogIf pr = False Then GoTo MyEndActiveDocument.PrintOutMyEnd:End Sub
You are the best. Thanks
this is great Mek! Now, I don't think this is possible, but I'm going to ask anyway =)Using this macro, is it possible to pass the custom page size dimensions into the print menu itself somehow?So let's say we have a page the size of 5.5" x 10" can that be passed into the print menu?Right now, I have to enter the page dimensions manually