I just can’t get it to print using the Selection. If InStr(Err.Description, “ActivePrinter”) = 0 Then But I can’t make it work! I had to change this line to include an equal sign to make it even run. This macro looks very handy for some things. I see people who aren’t that sharp using computers have really grabbed onto this one. That has been a huge benefit during the recent business system change where we needed to quickly send messages to others to show what we were seeing. I often use Snipping Tool (which comes with Office 2010) to grab bits of the screen and allows you to highlight things before pasting into emails and other programs. We now use it for some core business processes to make certain information available to all who need it, rather than just tied up in accounting. I got my boss and a some fellow employees on it. It’s saved my sanity while dealing with a merger and a complete business system change and all the meetings that come with those events. I’ve been using One Note for three years now. Private Sub Workbook_BeforeClose(Cancel As Boolean)Īpplication.OnKey "^+n", "PushExcelContentToOneNote" To set the keystroke, add the following in the ThisWorkbook module. MsgBox Err.Number & “: ” & Err.Description, vbCritical, “MICROSOFT ERROR” VbOKOnly + vbExclamation, “PRINTER ERROR” MsgBox “Excel cannot find the OneNote printer on your machine.” & _ If InStr(Err.Description, “ActivePrinter”) 0 Then ‘ Since the 1004 error number is too broad, we’ll check the error description instead. Selection.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:= FalseĪpplication.ActivePrinter = sOriginalPrinter ‘ Make sure One Note is the active printer.Īpplication.ActivePrinter = sONENOTE_PRINTER 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. 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.
0 Comments
Leave a Reply. |