Link to home
Start Free TrialLog in
Avatar of roverm
rovermFlag for Netherlands

asked on

Extend printdialog

Hi all,

I need to extend the printdialog in Windows (XP/Vista). I need to add a (hyperlink)button to it and be able to react to the click event for that button and interact with the 'normal' printdialog.
I prefer to create some kind of systemwide hook and capture all printdialogs for Windows but if this is not possible then I want to create this for Office 2007 (Word, Excel, Outlook...).

On MSDN I have found some articles but I need some C# sample code for this. Can anybody provide this?

Thanks!

D'Mzz!
RoverM
ASKER CERTIFIED SOLUTION
Avatar of Anurag Thakur
Anurag Thakur
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of roverm

ASKER

Hi, thanks but these are not sufficient (I already knew these).
This example only alters the printdialog that is created from my own application. This is not what I want to do.
So what you want to do is drop a hyperlink into *every* print dialog that can popup in the system?

 These Print dialogs may be customized, where are thinking of putting the hyperlink? You are looking at a huge rat hole..abandon hope for there be tigars.

 If you can tell us why you want to do this there may be a better solution.

 
 
Avatar of roverm

ASKER

Hi William,
The basic idea was to add a button to the printdialog of Word, then Excel, then Outlook.... and so on. I am a dotnet devver so using managed code I should be able to "easily" do this using C# for Office2007.
However, what about other applications (like notepad)?

Like I said in the opening post, I prefer to do it systemwide but if not possible then start with Word 2007.

The code that is executed behind 'my button' is not important, it could be anything.
Avatar of roverm

ASKER

btw: The code sample "PrintOddEven" on CodeProject might be usable if I could intercept the Word print command. Is there a way to do this? Maybe by creating an AddIn for Word2007?
Avatar of roverm

ASKER

Closing this question. I didn't solve the problem (yet) using C#. Using C++ it's possible to set a systemwide hook to capture every printdialog.