

SOriginalPrinter = Application.ActivePrinter ' PushExcelContentToOneNote V1 2 SCL Original developmentĬonst sONENOTE_PRINTER As String = “Send To OneNote 2010 on nul:” ' Contact: Name: Date: Init: Modification: ' reset the printer back to the original printer prior to the routine. ' Description: This will take the selected content and print it to OneNote, then So now, to send something to OneNote, All I need to do is hit Ctrl+Shift+N. Except they’re tied into a keystroke I’ve created upon opening the workbook. The routine below is basically nothing more than the automation of all the mouse clicks I mention above. Five in total, with more if you want to revert back to your normal printer.Ĭan’t I just use a button or keystroke to send something to OneNote without all the hullabaloo? Yes, I know I can highlight the selection, go to File, go to Print, change the settings to Print Selection only, change the printer to OneNote, then click print. Some method for sending a selection of the worksheet to OneNote with a single command or keystroke. What I really wanted was some method for sending pieces of Excel worksheets to OneNote without a lot of headache.

And OneNote has a great mobile app so you can access your notebooks from your iPhone or iPad. It’s a lot like Evernote, if Evernote were fully integrated with MS Office. You can share notebooks with people across the network or the web–the point is that it’s a great application. You can hit Record in a meeting and it will record and save an audio file of the conversation, which you can listen to later to assemble your meeting minutes. In a nutshell, it is a singular place to keep track of all kinds of things, like notes (duh), to do lists, snippets of things from the web, documents from Word, etc.

I won’t get all gushy about OneNote here, but you can look it up online. If you have the chance to use this little gem, I recommend it. I recently discovered Microsoft OneNote.We have it and at work and it is the singularly best kept secret we have. You can also move the button around while it is on the edit mode (have rectangle line around).It’s been a little while since I’ve geeked out with some VBA that would be anything worth posting, which means that the routine I wrote today was just that much sweeter. For this example, I change it to Print as shown in picture below. Now you can change it to the name as you want.
#Vba print selection code
The VB code will be saved under the Module that can be used on any sheet under this workbookĪfter you done with VB code and come back the Excel Sheet, a name of the button still shows the default name given by MS Excel.
#Vba print selection how to
This How To will show the step by step below. We just need to add the VB code under the click event for this button. Some time we need a short cut to print the current screen by using just one click. It will print an active screen on current sheet after you click on Print button. In this How To, I will show how to create a Print button to print current screen. How to Create a Print button to print a screen
