PC Review


Reply
Thread Tools Rate Thread

afterprint event?

 
 
sali
Guest
Posts: n/a
 
      2nd Oct 2007
there is an workbook beforeprint event, that is triggered when you start
printing.
is there some event [or some way to simulate it] that will be triggered when
the print job is generated and sent to the spooler/printer?

reason:
i have some fancy formating that is nice when you look at the screen, but is
not acceptable to be printed on the b/w laser
so, beforeprint event easily remove that formating when going to print, but
how to restore that formating automaticly after print is done?

[version: excel 2000]

thnx!


 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      2nd Oct 2007
Hi,

You might try this:-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Static Printit As Boolean
If Printit = True Then Exit Sub
Printit = True
ActiveSheet.PrintOut

'This code executes after printing
MsgBox "Print comp" 'Delete this line and put your own code in
Printit = False
Cancel = True
End Sub

Mike

"sali" wrote:

> there is an workbook beforeprint event, that is triggered when you start
> printing.
> is there some event [or some way to simulate it] that will be triggered when
> the print job is generated and sent to the spooler/printer?
>
> reason:
> i have some fancy formating that is nice when you look at the screen, but is
> not acceptable to be printed on the b/w laser
> so, beforeprint event easily remove that formating when going to print, but
> how to restore that formating automaticly after print is done?
>
> [version: excel 2000]
>
> thnx!
>
>
>

 
Reply With Quote
 
sali
Guest
Posts: n/a
 
      2nd Oct 2007
thnx!

nice idea to use eventproc itself to cancel its own event [suicide]


"Mike H" <(E-Mail Removed)> je napisao u poruci interesnoj
grupi:462AAEF0-3D87-4C24-80B4-(E-Mail Removed)...
> Hi,
>
> You might try this:-
>
> Private Sub Workbook_BeforePrint(Cancel As Boolean)
> Static Printit As Boolean
> If Printit = True Then Exit Sub
> Printit = True
> ActiveSheet.PrintOut



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2007. Event ID 25, Event ID 2000. Microsoft Office 12. Event ID 2001 David F. Sage Microsoft Outlook Discussion 0 10th Mar 2008 01:24 PM
Event ID: 1003, Event Type: Error ,Event Source: System Error,Event Category: (102) BoazBoaz Windows XP General 0 21st Jun 2006 05:39 PM
I need to clear temporary the event sinks from another event and then restore them, but I don't know which methods signed up for that event Serge Shimanovsky Microsoft Dot NET 1 14th Apr 2005 05:37 AM
I need to clear temporary the event sinks from another event and then restore them, but I don't know which methods signed up for that event Serge Shimanovsky Microsoft Dot NET Framework Forms 14 7th Feb 2005 08:48 PM
afterPrint event =?Utf-8?B?TWFyY3VzIEs=?= Microsoft Word Document Management 1 29th Sep 2004 02:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:46 AM.