| View previous topic :: View next topic |
| Author |
Message |
henrywood Contributor

Joined: 21 Sep 2004 Posts: 66 Location: Copenhagen, Denmark
|
Posted: Sun May 06, 2007 2:55 pm Post subject: IE Print Templates & Gadget X |
|
|
Since I decided to buy a copy of Gadget X, I was wondering if the printing templates functionality would be accessible through Gadget X
Print Templates are described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/beyondprintpreview.asp
The way to go that I imagine:
1. Write a print template
2. Using Gadget X instantiate a WebBrowser Control, and telling it of the print template upon instantiation
The above article seems to indicate that you need C++ for using this print template functionality, but if the correct parameters can be passed to the WebBrowser control, I imagine that this would be possible ?
Anyone with thoughts on this ?
Henrik |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sun May 06, 2007 3:15 pm Post subject: |
|
|
Henrik,
I looked at this page and yes this is possible with GadgetX. I have an demo in the GadgetX package called surfxbrowser-gadgetx.dsc that shows how to tell the Browser control to print and too do a print preview. You would only need to pass the command called Ole Command the path to the template you would like to use.
| Code: |
:Print PreviewMENU
# Call IE's Print Preview Command
#Ole CallMethod,SHDocVw,"ExecWB(^d,^d,^p,^p)",OLECMDID_PRINTPREVIEW,OLECMDEXECOPT_PROMPTUSER,NULL,NULL
SetVar vaTemplatePath,%%TemplatePath,^B
Ole Command,Document,Exec,OLECMDID_PRINTPREVIEW,OLECMDEXECOPT_PROMPTUSER,vaTemplatePath,NULL
goto evloop
:PrintMENU
# Call IE's Print Command
# Ole CallMethod,SHDocVw,"ExecWB(^d,^d,^p,^p)",OLECMDID_PRINT,OLECMDEXECOPT_PROMPTUSER,NULL,NULL
SetVar vaTemplatePath,%%TemplatePath,^B
Ole Command,Document,Exec,OLECMDID_PRINT,OLECMDEXECOPT_PROMPTUSER,vaTemplatePath,NULL
goto EVLOOP
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
henrywood Contributor

Joined: 21 Sep 2004 Posts: 66 Location: Copenhagen, Denmark
|
Posted: Sun May 06, 2007 3:43 pm Post subject: |
|
|
That looks easy enough.
Thank you for your help !
Henrik |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|