Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: 12 Mar 2007 04:33:17 -0700,    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


OLECMDID_PAGESETUP select printer other than default   
Hi all

I'm working on a web app that prints without print dialog, custom
margins, header, footer etc.
I was able to make this work with the windows default printer
WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMTUSER,1)

But .. it is really necessary to have the app print to a non-default
printer.
Is there anyway to defnine a printer using OLECMDID_PAGESETUP or any
other way?

All help much appreciated

chaosvg
date: 12 Mar 2007 04:33:17 -0700   author:   unknown

Re: OLECMDID_PAGESETUP select printer other than default   
wrote in message
news:1173699197.421986.321650@c51g2000cwc.googlegroups.com
> I'm working on a web app that prints without print dialog, custom
> margins, header, footer etc.
> I was able to make this work with the windows default printer
> WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMTUSER,1)
>
> But .. it is really necessary to have the app print to a non-default
> printer.

http://msdn2.microsoft.com/en-us/library/bb250434.aspx
http://msdn.microsoft.com/workshop/browser/hosting/printpreview/print_template_entry.asp

-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Mon, 12 Mar 2007 08:21:11 -0400   author:   Igor Tandetnik

Re: OLECMDID_PAGESETUP select printer other than default   
On 12 mrt, 13:21, "Igor Tandetnik"  wrote:
>  wrote in message
>
> news:1173699197.421986.321650@c51g2000cwc.googlegroups.com
>
> > I'm working on a web app that prints without print dialog, custom
> > margins, header, footer etc.
> > I was able to make this work with the windows default printer
> > WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMTUSER,1)
>
> > But .. it is really necessary to have the app print to a non-default
> > printer.
>
> http://msdn2.microsoft.com/en-us/library/bb250434.aspxhttp://msdn.microsoft.com/workshop/browser/hosting/printpreview/print...
>
> --
> With best wishes,
>     Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925

Thanks for your suggestion, Igor, but I can't see any way to select a
printer using these print templates.
Am I missing something here ?

Chaosvg
date: 12 Mar 2007 08:12:51 -0700   author:   unknown

Re: OLECMDID_PAGESETUP select printer other than default   
stefaan.van.grunderbeek@gmail.com wrote:
> On 12 mrt, 13:21, "Igor Tandetnik"  wrote:
>>  wrote in message
>> news:1173699197.421986.321650@c51g2000cwc.googlegroups.com
>>
>>> But .. it is really necessary to have the app print to a non-default
>>> printer.
>>
>> http://msdn2.microsoft.com/en-us/library/bb250434.aspxhttp://msdn.microsoft.com/workshop/browser/hosting/printpreview/print...
>>
> Thanks for your suggestion, Igor, but I can't see any way to select a
> printer using these print templates.
> Am I missing something here ?

No, you are not. I had this vague recollection that <templateprinter> 
tag allowed one to select non-default printer, but upon checking it 
seems I was wrong.

The only workaround I can think of is to use SetDefaultPrinter to 
temporarily set whatever printer you want to print on as default, start 
printing, then restore the old default.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Mon, 12 Mar 2007 11:58:50 -0400   author:   Igor Tandetnik

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us