Friday, February 24, 2012

Paste Without Formatting in Word 2007

I don't know about you, but when I'm pasting something into a Word document (like from a web page), I find that more often than not, I want it to go in without any formatting. If you do this once or twice in a day, its easy enough to click on the "Paste" control, change the selection in the popup window to "Unformatted Text", and press ok. However, if you have to do this more frequently, this can quickly become a pain.

Today, I was working on a document where I was copying titles from our software bug tracking system over to a table in a word document. Because I was coming from an HTML document, Word was happily keeping the HTML format, and putting the titles in with a large blue-colored font. This is not what I wanted! Since I had to do this for 50 or so entries, I quickly got tired of the solution above, and went to Google and found this nice article:

  Paste text without the formatting into a Word document

Nice!  However, I quickly realized that my version of Word (2007) didn't mesh too well with the article's target version (2002).  If you've used the newer version, you'll know what I'm talking about.  Sure, the ribbon UI looks nice, but WHERE THE HELL DID EVERYTHING GO!  I remember how long it took me just to figure out how to PRINT my document for the first time!  Sheesh.

Well, time heals all wounds, and I've gotten much more adept at the latest Word layout, and even figured out how to apply the instructions from the article to my version.  In case you were interested (and so I don't forget how to do this), I'm reproducing the Word 2007-friendly instructions here:

STEP 1 - Create the Macro

  • Start Word 2007
  • On the View tab, click the Macros button
  • In the Macro name box, type PasteUnformattedText
  • Make sure that "All active templates and documents" is displayed in the "Macros in:" dropdown, and then click the Create button.
  • The Microsoft Visual Basic editor will open
  • Directly above the End Sub statement in the PasteUnformattedText subroutine, type or copy/paste the following line of code:
Selection.PasteSpecial DataType:=wdPasteText
  • On the file menu, select "Close and Return to Microsoft Word"

STEP 2 - Assign the Macro to CTRL-V

  • Open the main Word menu by clicking on the Microsoft Office icon in the upper-left corner (round button)
  • At the bottom of the popup window (not one of the menu choices), click the "Word Options" button.
  • Select "Customize" from the left panel.
  • Near the bottom of the panel, click on the "Customize..." button next to "Keyboard shortcuts:"
  • Make sure the "Save changes in:" dropdown shows "Normal.dotm"
  • In the Categories list, click Macros
  • In the Macros list, click PastUnformattedText
  • Click in the "Press new shortcut key" box (the cursor will appear there)
  • Press and hold the CTRL key, and then press "V".  You should now see "CTRL-V" in the box.
  • Click the "Assign" button, and then "Close", and then "Ok"
That's it!  Now anytime you copy (CTRL-C) from a web page, and then paste (CTRL-V) into your word document, you will get the unformatted text without any extra work.  If you decide you want the original default behavior back, switching is simple:

Restore Default Behavior to CTRL-V

  • Open the main Word menu by clicking on the Microsoft Office icon in the upper-left corner (round button)
  • At the bottom of the popup window (not one of the menu choices), click the "Word Options" button.
  • Select "Customize" from the left panel.
  • Near the bottom of the panel, click on the "Customize..." button next to "Keyboard shortcuts:"
  • Make sure the "Save changes in:" dropdown shows "Normal.dotm"
  • In the Categories list, click Macros
  • In the Macros list, click PastUnformattedText
  • In the "Current Keys" box, click on CTRL-V.
  • Click the "Remove" button, and then "Close", and then "Ok"
Back to normal!  Of course, that macro is still there if you ever want to use it again, so you never have to repeat STEP 1 above.

Well, back to work.

Friday, February 03, 2012

Grocery Ninja Aisle Sorting

I received a 1-star review on this app recently that read:
The main feature that I was looking for is the ability to sort by aisle number. It has the feature, but the feature doesn't work. It just won't sort. (yes I checked off sort by aisle.)

Since there is no way to really respond to a comment (except to submit a review), I figured I'd attempt to address it here.  First of all, it does work in my hands, and on all the devices I've tested.  I suspect this user is doing something I didn't expect when I designed this feature.  Rather than guess what might be wrong, I'll detail how this feature works in case this user ever looks here for more info:

  • Setup a store by adding a store, and adding a list of aisles (either manually or using the in-app generation feature)
  • Organize the aisle order by clicking and dragging items into place
  • Create your grocery list
  • Assign a location to each item that doesn't already have one by long-clicking, and choosing from the list of aisles
  • Verify that the "Sort by Aisle" option is checked under settings.
That's it! If you've done this, and it still isn't working, I'd love to hear from you. If there's a problem with this feature, the only way I can fix it is by hearing from you.