Event "Workbook_BeforePrint" not on new funtion "preview&print"

Hi
After starting the work with Excel 2010 I recognized that the new function "print&preview" does not call the event "Workbook_BeforePrint" from the VBA code. In Excel 2007 the event is called on both functions, print and preview.
As the new function "preview&print" is pushed to the user, it will the one to be used to call the preview. But with a macro on the event "Workbook_BeforePrint" the preview will not show the result as it will be printed.
Is there any action I can take to solve this problem on my side? Or is there any plan to integrate the event into the new function?
Many thanks for every help.

Hello Parzungjh,
Welcome to the MSDN forum and we are glad to help with you.
After reading your post, I did test in Excel2010 and Excel2007, just as you said, I reproduce your problem. However, I don't think
it as a problem.
I think it is by design.
I found that print and preview feature is integrated in Excel2010. If you want to control the trigger of BeforePrint event
in Excel2010, you can write some simple VBA codes as follows:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim Print_or_Preview As XlYesNoGuess
Application.EnableEvents = False
    Cancel = True
    Print_or_Preview = MsgBox("Show Print Preview?", vbYesNo)
    If Print_or_Preview = vbYes Then
        ActiveWindow.ActiveSheet.PrintPreview
        Else
        ActiveWindow.ActiveSheet.PrintOut
    End If
Application.EnableEvents = True
End Sub
ActiveWindow.ActiveSheet.PrintPreview
can open the print preview dialog like Excel2007. I haven't found the way to open the print view dialog through UI.
I think it is the change in Excel2010.
I hope it can help you and feel free to follow up after you have tried.
Best Regards,
Bruce Song [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Similar Messages

  • Sap.me.TabContainer - select event does not return new Tab

    Hello,
    i've created an TabContainer Element and want to get the "new" Tab when select is triggered. But the Event return the current tab.
    Any Idea if this is a bug or how i can detect the new Tab that is shown?
    Thx
    Christopher

    Of course:
    this.tc = new sap.me.TabContainer("tc", {  
    contentInfo :    new sap.m.List("ex1" ),
    contentNotes : new sap.m.List("ex2"),
    contentPeople : new sap.m.List("ex3" ),
    expandable : true,
    select : function(oControlEvent){ //oData, fnListenerFunction, oListenerObject)
    oControlEvent.getSource().getSelectedTab( );

  • Day events & day notes "double spaced" in printing

    Since updating clients to Oracle Calendar v10, day events & day notes are doubled spaced on printing. Formerly, while users could list four or five events or notes below the day in question (on week view), now they can only print three; more than three and an overflow page is generated.
    I just tested, and the problem persists with 10.1.2 (MacOS X 10.4.3). Is this a deliberate change?

    Hi Guys, actually there's a SAP note,
    https://websmp230.sap-ag.de/sap(bD1lcyZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1268743
    It's happening in some weird moments, it's absolutely random and is happening in 2005 and 2007.
    Well, by now a lot of flags to control this, by the way in PL44 and PL46 are not listed this note as solved.
    Gabriel

  • Smartform preview / print of chinese characters

    Hello all
    I am facing this issue:
    After implementing SAP Note 852926, the Smartform preview / printing works fine with Chinese characters in DEV system.
    The Unit test were OK and then the SAP Note has been transported to our TEST env, but the chinese characters are not previewed and printed correctly there.
    I see characters as "»ÆêÍ" instead of "黄晖"
    I can not find any difference in settings / fonts of the two systems. What am I missing?
    Anybody can give a hint?
    Thanks
    Imrich

    Hello Imrich,
    Do you use the same device type to print in th test system?
    To print Chinese characters from SAP, there are some rules:
    1. The form must have Chinese language key 'ZH' or the Chinese texts must be included as standard texts with the language key 'ZH'.
    2. The correct Chinese fonts(e.g. CNHEI or CNSONG) must be used for the Chinese texts in the form.
    3. The form must be processed with a device type that supports the simplified Chinese language.(eg:device type CNSAPWIN).
    Another possibility if you have a Unicode system is tp print via desvice type SWINCF. Here the language of the form doesn't matter.
    Regards,
    Aidan

  • Print Preview in RFx does not show new Adobe Interactive Form

    Hello Experts,
    I am trying to assign a standard Adobe Interactive form as the output form for SRM RFQ.  I have carried out the following steps in customising under "Define Actions for Document Output".
    - Selected bid invitation Action Profile = BBP_PD_BID
    - Go to "Processing Types"
    - Create a new Processing Type called "External Communication"
    - Set the following values to the new processing type:
         - Form Name = BBP_BID_INV_ADB
         - Form Type = P PDF-Based Forms
         - Format = BBP_BID_INV_ADB_MAI
         - Personalization Type = 5 - Recipeient Variable Replacement
    - Save Changes
    My problem is that when I go to into the BID (RFx) and click "Print Preview" it picks up the standard Smartform, not the new Adobe form I have added as required.
    Please can you advise of any additional config settings or other steps required to ensure that the Adobe Form is called when I click "Print Preview"?
    We are on SRM 7.0.
    I look forward your response.
    Regards,
    Matt

    Hi Matt could you please tell me how do you solve your issue? I have the same and I cant find the solution.
    Thanks a lot
    Kind Regards

  • When I sync my iPod to my MacBook through iTunes new events do not show up and old events are not deleted. I am using Snow Leopard  and not iSync.

    I am using Snow Leopard on a MacBook. I have an iPod touch 3G. I do not use iSync it Mobile Me. When I sync my iPod through iTunes new events on my iPod do not show up on my Mac and old events do not delete. I have read help instructions that include deleting the data on the iPod. The iPod has the correct data and the Mac does not so I have not followed those instructions. I need help as the only reason I bought the Mac was to be able to sync, back up, view and print my calendar. Currently it is useless. If only Apple could have learned from the elegance of the Palm software.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • Since I uploaded the new OS X Mavericks the App Store, Messages, Notes, Calendar, Maps and Preview will not launch/open. In Finder cannot find my files. Most crucially cannot upgrade OS X Mavericks software. I had two apple ID's, the old one not used

    Since I uploaded the new OS X Mavericks the App Store, Messages, Notes, Calendar, Maps and Preview will not launch/open. In Finder cannot find my files. Most crucially cannot upgrade OS X Mavericks software. I had two apple ID's, the old one not used

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • My calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    my calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    Hi,
    To configure your ODBC DataSource, go to Control Panel ---> DataSources(ODBC) (If you are in a Windows environment).
    Select the tab System DSN. If you have not added your data source, then do so by clicking on the Add button. If you have added the datasource, click on the Configure button to configure it.
    Give the datasource name, then the database name.
    You have to give the hostname, service name and server name. I guess, in most cases, the datasource name and host name will be the same, service name and server name will be the same. If you are using TCP/IP, the protocol will be onsoctcp.
    There will be a file named Services under C:\WINNT\system32\drivers\etc where you have to give the port number for accessing this server.
    It will be like this <service name> <portnumber>/tcp
    Hope this helps...
    best wishes,
    Nish

  • Ical not showing new events and older events as well

    Hi There,
    Since (as I recall) last monday, iCal started to work strange. Or, better put in other way: stopped working.
    I have three calendars only (personal, work and "no category), all of them syncing with iCloud. There are two other local calendars too (in "my mac"), but I don't use them and they are unchecked.
    I only use my macbook white and an iphone 3GS, also syncing with iCloud.
    I don't subscribe any external calendar and don't accept any kind of invitation. It is a basic-simple use: I set my appointments (throw the whole year) and want to see / edit them on iphone.
    Finally, I use reminders (on iphone) a lot and share the "personal" calendar with my with (she uses iCloud on her iphone and ipad).
    The problems are basic two (as I could indentify so far):
    1) I can't set new appointments on iCal. Or better: I may set, but cannot see it. For instance, when a double click the Feb 24th to set a appointment, nothing happens, but a "New event" apperars on iCloud, right way. Looks like that iCal is setting the event up, but it just does not show it. Lately, I've discovered that when I go to the week view in iCal, it shows the event, but it just don't appear on month or year views;
    2) There are a bunch of events that appear correctly on iCloud (and iphone) but just don't show up in my iCal.
    I've been trying to find a solution, already followed a couple of step-by-step possible solution (deleted local calendars, took off iClound accoun from iCal, deleted all files on specific folders in my library), but anything work out. It just don't work anymore.
    Scary...
    I have just quit iCal and started using iCloud as my main input way for may events.... Wonder if anyone else is facing something like this and if is there any sollution out there.
    Thanks a lot in advance and sorry for my bad English.

    i have a similar problem. i can't add any new events to my ical. i can do it on ical on icloud but not on the ical on my itouch. i can't edit them either. it tells me the event can not be saved because a calendar has not been chosen. it was working just fine yesterday and now it won't work.
    i'm new to this on line community stuff. i posted my questions but i don't know how i'm supposed to see any answers. i guess it doesn't matter that i even ask you this or reply to you because i don't plan to be able to see any comments to this. oh well. computer stuff is just crap  sometimes. i guess we have to learn to deal with it.
    my paper calendar NEVER gave me any problems. i would just pull out my trusty pen and write down my appointment and wallah! it was done. it wouldn't get erased or deleted or stop working.

  • I just bought a new printer for my iMac version 10.7 but I am able to install the software but for some reason I am not able to view the printer under system preferences to add the printer. It is connected with the USB cord!!

    I just bought a new printer for my iMac version 10.7 Lion but I am able to install the software but for some reason I am not able to view the printer under system preferences to add the printer. It is connected with the USB cord!! It as if the printer does not show up in the add printer section under system prefernces!!

    I checked the manufacturer and apple site to see if my printer is supprted and it said it was!! I am using the HP officedeskjet 4500 G510a-f (HP Officejet 4500 Desktop)!! Still does not show up under add printers please help!!

  • I keep getting error messages on the calendar since downloading the new software on my IPAD2. It either says "cannont save event. That event does not belong to that event store" or I get an error message that says that no calendar "has been set".

    I keep getting error messages on the calendar since I downloaded the new software on my IPAD2.  When I try to add a new event it either says "That event does not belong to that event store" or it says "the calendar has not been set".  Does anyone know what these messages mean or how to address this?

    I'm getting the same issue on my ipad2...I set up a new calender and now I keep getting this error message....how do I fix this?

  • Printer Setup Utility will not allow new driver to be added

    I just bought a Canon Pixma MP960, installed the drivers and then downloaded the driver from their website. When I go to add a new driver in Printer Setup Utility--i highlight the MP960 connected thru USB, but the 'add' feature is not lit up. When i have it search for new drivers, it detects a new driver, but when I hit 'add'--Printer Setup Utility "unexpectedly quits" every time. The only drivers in there are beta thingies that do not work w/ my printer.
    The Canon tech guy says that there is a problem with my Printer Setup Utility--but i can't seem to find a solution online. I don't know much about macs, but can I update the Printer Utility program or something? help!

    Part of the problem might be if you actually have more than one version of the driver for the printer installed on the computer. Check the drivers at Mac OS X disk/Library/Printers/Canon/ and make sure there is only one plugin for the printer. If you have more than one, trash both and download and install only the driver from Canon that is compatible for Mac OS X 10.4.x. After you install the driver, run Repair Disk Permissions using Disk Utility. If you have only one correct printer driver plugin installed, it should work.

  • Pictures are not shown when saving to PDF.  Cannot Preview Print Job.

    Help! Pictures are not shown when saving to PDF.  Cannot Preview Print Job.

    I guess you need to fix it
    Or if you would like some help provide some information - there are no mind reader supporting this forum and we can only work with the information you give us - right not that is "it does not work"
    iPhoto has no "save to PDF" function - exactly what are you doing? and what exactly do you want to do?
    LN

  • Installed Maverick on new IMac and printer will not print

    I purchased a new IMac in December after always having PCs so there has been a learning curve for me.  A few days ago I installed the Maverick update.  So far, so good except my printer no longer will print.  I have a new Canon MC7120 printer/scanner.  I am still able to scan, but not print.  When trying to print, I have received a popup telling me to install software.
    Would you be able to walk me through what I am suppose to do?  I am assuming I am to install software again that I installed when I purchased the printer.  Being new to Macs, I don't want to do something I shouldn't.  Your help would be appreciated.  Thank you

    The printer is not listed as supported on this page:
    OS X: Printer and scanner software available for download
    You may be able to get it to work with the software from here:
    Canon U.S.A. : Consumer & Home Office : PIXMA MG7120

  • IPad will not send new Calendar events to MobileMe

    My iPad will not send new or edited changes to MobileMe.
    I have turned off syncing through iTunes to prevent multiple listings of the same event. When I add or change an event on my computer it is changed on my iPad thru MobileMe without any problems, but when I change or add an event on my iPad it is not sent back to MobileMe or to my computer.
    (in Settings, Push is set to 'on' on the iPad)
    How do I fix this?

    daleq1,
    Is your iPad updated to IOS 4.2, or later?
    You may have to turn Calendars off/then back on. Apple - MobileMe - Set Up MobileMe
    Make sure that you do not choose to remove any calendars from your iPad when turning it off. When turning it back on be sure to choose "Merge with MobileMe" to ensure that you do not lose any calendar data which has been already entered on you iPad.

Maybe you are looking for

  • Handling RICH TEXT content on BI publisher report

    Hello, I have requirment where I have to handle RICH TEXT content, and show data in report with RICH TEXT formating. The RICH TEXT content(with tags) is comming from database CLOB column. Here is the sample XML data. <?xml version="1.0" encoding="UTF

  • Is ExportPDF included with Creative Cloud?

    Right now i have both.

  • Help! I lost my Pictures during a sync

    I rebuilt my computer and not thinking i did a full sync. Instead of it taking the photos on my IPOD and putting them on my pc it deleted them and placed the 2 sample photos on my ipod. I noticed when it was syncing that it says backing up IPOD befor

  • How to get pdf SigFields sorted as they shown on the page?

    I need to get sigfields as they are placed in the document according taborder. I tried DigSigEnumSignatures, AFPDDocEnumPDFields, CosDictGetKeyString(cosPage, "Annots") but sort order of these fuctions is not match with taborder.   

  • Network a Windows to an Emac

    Hi I want to network a windows based computer to my Emac. It's a Pentium II (333Mhz) running Windows XP. I am running OS 10.3.9 on my Emac and it is connected to the net via ADSL by ethernet. I'd like to be able to run the Windows computer to access