Recent Tweets

Entries in shoeboxed (2)


Automating Quicken QIF Import

In my last post on receipt automation I rambled on about different things I was trying to automate and otherwise ease managing my finances digitally. One TODO item from that post was easing the process of importing transaction data in QIF format into Quicken. Quicken stopped supporting QIF import some time ago with a move to an OFX format. I found I could not import QIF data into Quicken Essentials for Mac, though I tried in vein with an AppleScript. I ended up switching to Quicken Deluxe 2011 for Windows which had some limited QIF import into account types such as Cash accounts. That however wasn't ideal as it was a few different manual steps and it got old quick.

Approaching automating Quicken for Windows

With that in mind I decided to try automating the QIF import process on Windows. There are different frameworks for automating Windows. For now I chose Microsoft's UI Automation library mostly because it was "baked in" for free and what I wanted to automate seemed pretty straightforward. I knew there were various limitations with the UI Automation Library, such as those described here by Brian Genisio. For the small process I needed to automate though I did not consider those to be a roadblock, more just bumps along the way. I considered coding against the library with Powershell script but figured it would take me longer. I already had started a receipt scanner / uploader app and it made sense for me and some non-developers to build this into that application.

Magic Pixie Dust Hacks Happen Here

I will ignore the ugliness in the middle for now and show a demo of the final product. There is not much to see; the devil is in the details but the basic steps are simple:
  1. Quicken app instance reused if present, created if not (some wait for pwd)
  2. Import QIF menu item is clicked
  3. Values from receipt app are input into QIF import dialog, import button clicked
  4. Unrecognized category dialog is checked for and handled if present
  5. # items imported is determined
  6. Go to Register button is clicked
  7. Imported transactions are selected
  8. Move transactions menu item clicked
  9. Account to move to is supplied, move button clicked

You will need to view full screen with HD on for detail unless you have really good vision.

The usual disclaimers

  • Only tested with Quicken Deluxe 2011 Windows
  • Assumes last used Quicken file is where data should be imported
    • Most work with single quicken file per user. Adding filename adds another step
  • Assumes the "temporary" (i.e. Cash) transfer (swap) account is empty at point of import
    • May work either way depending on data and details but not tested
  • Limited support for error checking, edge cases, potential timing issues

The Get 'er Done Code

The code isn't pretty but it gets the job done in what spare time I had. I did not consider it worth too much effort given this is somewhat "meware" at this point, it could easily break on future versions of Quicken, and I have doubts about how long I will have need of this functionality.

The main import method:
	public void Import()
	    if (null == this.AppSettings) throw new NullReferenceException("Quicken App Settings are required");
	    if (null == this.ImportSettings) throw new NullReferenceException("Quicken Import Settings are required");


	    var launcher = new QuickenLauncher(this.AppSettings);
	    var mainWin = launcher.Launch();

	    var menuBar = mainWin.FindFirst(TreeScope.Children, 
	        new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.MenuBar));
	    if (null == menuBar)
	        throw new NullReferenceException("Failed to resolve menuBar");

	    ClickMenuItem(menuBar, this.ImportSettings.QifImportMenuPath);

	    var qifWin = WaitOnWindow(mainWin, this.ImportSettings.QifWindowImportTitle);

	    var qifFileTextBox = qifWin.FindFirst(TreeScope.Descendants, 
	        new PropertyCondition(AutomationElement.AutomationIdProperty, "100"));

	    var acctCombo = qifWin.FindFirst(TreeScope.Descendants, 
	        new PropertyCondition(AutomationElement.AutomationIdProperty, "2302"));

	    ClickQuickenButton(qifWin, 32764);

	    var categoryMsgBox = mainWin.FindFirst(TreeScope.Descendants,
	        new PropertyCondition(AutomationElement.NameProperty, this.AppSettings.QuickenVersion));
	    if (categoryMsgBox != null)
	        // click Yes on the question about adding new categories
	        ClickQuickenButton(categoryMsgBox, 101);

	    // we have to re-get the qif window even though we had a ref to it before
	    qifWin = WaitOnWindow(mainWin, this.ImportSettings.QifWindowImportTitle);
	    if (null == qifWin) return;

	    var itemsImportedLabel = qifWin.FindFirst(TreeScope.Descendants, 
	        new PropertyCondition(AutomationElement.AutomationIdProperty, "1014"));
	    var importedText = itemsImportedLabel.Current.Name;
	    int pos = importedText.IndexOf(" ");
	    var importedCount = Convert.ToInt32(importedText.Substring(0, pos));

	    // click Go To Register button. the done button is id 32767
	    ClickQuickenButton(qifWin, 1010);


	    var txWin = mainWin.FindFirst(TreeScope.Descendants,
	        new PropertyCondition(AutomationElement.ClassNameProperty, "QWClass_TransactionList"));
	    if (null == txWin) throw new NullReferenceException("Failed to find transaction list window");

	    // need to get the focus into one of the transaction list fields
	    var dateEditor = txWin.FindFirst(TreeScope.Descendants, 
	        new PropertyCondition(AutomationElement.AutomationIdProperty, "3"));
	    if (null == dateEditor) throw new NullReferenceException("Failed to find date editor window");

	    // focus will be after the last transaction entered. Shift + Up Arrow to select # of transactions imported
	    // now that we've focused into date editor and not window itself need one extra shift+Up
	    for (var i = 1; i <= importedCount+1; i++)

	    // bring up the move transactions dialog
	    ClickMenuItem(menuBar, ImportSettings.MoveTransactionsMenuPath);
	    var moveWin = WaitOnWindow(mainWin, "Move Transaction(s)");
	    if (null == moveWin) return;
	    var moveToAcctCombo = moveWin.FindFirst(TreeScope.Descendants, 
	        new PropertyCondition(AutomationElement.AutomationIdProperty, "100"));
	    ClickQuickenButton(moveWin, 32767); // move button

And some utility methods:
	private static AutomationElement WaitOnWindow(AutomationElement mainWin, 
		string title)
	    AutomationElement win = null;

	    int iterations = 0;
	    while (win == null)
	        win = mainWin.FindFirst(TreeScope.Descendants, new PropertyCondition(
	            AutomationElement.NameProperty, title));
	        // we have to wait a tick before the QIF Import window is shown

	        if (++iterations >= 8) break;
	    return win;

	private static void ClickQuickenButton(AutomationElement window, 
	    int automationId)
	    var btn = window.FindFirst(TreeScope.Descendants, new PropertyCondition(
	        AutomationElement.AutomationIdProperty, automationId.ToString()));
	    // can't use InvokePattern - GetSupportedPatterns() returns 0 - special QC_button type
	    //invokePattern = (InvokePattern) btn.GetCurrentPattern(InvokePattern.Pattern);

	    // can't set the focus either

	    if (null == btn)
	        throw new NullReferenceException(string.Format(
	            "Couldn't find a button with automation id of {0} on window {1}", 
	            automationId, window.Current.Name));

	    // welcome to hack city. we'll move the mouse cursor and click the button
	    var point = new Point((int)btn.Current.BoundingRectangle.Left, 
	    Cursor.Position = point;
	        | Win32API.MOUSEEVENTF_LEFTUP, point.X, point.Y, 0, 0);

	private static void ClickMenuItem(AutomationElement menuBar, string path)
	    var items = path.Split("|".ToCharArray()).ToList();

	    var parent = menuBar;
	        var menu = parent.FindFirst(TreeScope.Descendants, 
	            new PropertyCondition(AutomationElement.NameProperty, item));

	        if (menu.GetSupportedPatterns().Contains(ExpandCollapsePattern.Pattern))
	            if (!menu.Current.IsEnabled) throw new InvalidOperationException(
	                string.Format("Menu item at path '{0}' is not enabled; cannot expand", path));
	            var expandPattern = (ExpandCollapsePattern) menu.GetCurrentPattern(
	        else if (menu.GetSupportedPatterns().Contains(InvokePattern.Pattern))
	            if (!menu.Current.IsEnabled) throw new InvalidOperationException(
	                string.Format("Menu item at path '{0}' is not enabled; cannot click", path));
	            var invokePattern = (InvokePattern) menu.GetCurrentPattern(InvokePattern.Pattern);
	        parent = menu;

Code Notes

  • Automation id was the surest way of referencing controls and I used Winspector Spy to retrieve the ids. It's a little hard to find online but Spy++ or similar works as well.
  • Quicken buttons had a special QC_button type that appeared to be preventing me from using invoke pattern to click the button. Focus didn't work either; moving the mouse cursor over the button bounds and sending a click via Win32 API certainly isn't ideal.
  • Thread sleep calls were required to give Quicken time to respond to the previous action. In cases they might be removable, in other cases the delay might need adjusting. Other techniques could be used to wait and more safety checks could be added to ensure Quicken is at the point the code expects it to be. With reasonable enough delays I didn't have issues regardless of how much my machine was crawling at a given moment.
  • QuickenAppSettings holds quicken app version info and has filename resolution. QuickenImportSettings includes account names, window titles, menu paths and related. Less fixed variables/settings are passed along from app.config to the settings classes. The QuickenLauncher class takes care of activating or starting Quicken.

Full Source & Runtime Bits

The application requires the .net framework 4.0. More about the Receipt Transfer Utility application is available in my prior post in this topic.

Source | App files only

Future thoughts

In addition to addressing code cleanup / refactoring / rewriting and aforementioned limitations, tagging imported transactions could be useful. This would help identify how the transactions were entered. Some items such as flags and notes can only be set on a per-transaction basis and that could really slow down the import. Quicken's Find/Replace dialog allows bulk editing fields like tags which could work. It appeared to have secondary dialogs though and since it is modal it would require extra work on another thread.

Another thought I had for the portion of this app was generating the Quicken QIF file myself using the Shoeboxed API images and receipt data. This would provide a couple benefits. First it would keep the quicken import process within the app without having to first go to the website and export the receipts then provide the filename to the app. Second I have had some issues with the category data being incorrect for Quicken-exported receipt data from The file format is easy enough to write but it appears the Shoeboxed API does not yet have all the data I would need. Ultimately if Intuit and worked together for better integration I would not be stuck with the burden of working around these data transfer problems.

Receipt automation with Shoeboxed, Quicken, Evernote and more

I try to be pretty organized with my finances otherwise I cannot tame the beast. This has included entering transactions into financial software (i.e. Money, Quicken), scanning and shredding receipts and bills, online bill pay, e-statements, sites like, and various other tools and techniques. While most of my transactions are personal and not business expenses, I still find this a worthwhile investment. I have never liked the paperwork involved though so I have always strived for paperless personal finance in this digital world.

The downside to this goal is that achieving it tends to require a lot of tedious, boring work when you have many financial transactions. This is especially true with keying in transactions from various receipts, and even more so if you want to digitally manage the receipts, bills and related documents. After staring in despair at my last stack of receipts on my desk, I decided to take a shot at automating some of this work with a trial of along with some other changes along the way.
  1. Background
  2. The desire for more
  3. - Your Personal Financial Assistant
  4. Evaulating Shoeboxed Costs
  5. Trying Shoeboxed Mail-In
  6. Other ways of sending receipts faster
  7. Shoeboxed applications
  8. Exporting the data from Shoeboxed to Quicken
  9. A script to import the data into Quicken?
  10. Completing the picture with Evernote
  11. A custom receipt scanning and uploading application
  12. Ideas for the future
  13. Conclusion


First I believe it is helpful to review the path that lead me here.

The stone age In other words, the time of check registers and hand-written paperwork. I gave this up probably 12 years ago and have never looked back. If you were born in the late 70's or after and you are still here, you are in the minority.
Microsoft Money Money really helped me get a handle on my finances. Suddenly tracking, reporting, forecasting, budgeting, reconciling and more became manageable. I would key in my receipts and then throw them away.
Microsoft Money + paper receipts Throwing away receipts bit me several times, even ones I thought unimportant. Soon I realized the value of saving them which included: reconciling help, returns, warranties, price matching, taxes, reimbursements, rebates, insurance and more. Each month I would put my receipts in a different envelope.
Money / Quicken + scanned receipt "sheets" Receipt envelopes quickly piled up and finding anything was a pain so the envelope method didn't last long. After entering receipts I started laying 6 to 9 receipts at a time on my scanner bed and scanning them as single image sheets of several receipts, then shredding the originals.

Meanwhile I reluctantly switched from Money to Quicken for 4 main reasons:
  1. Money occasionally messed up my starting balance making it hard to reconcile against the bank
  2. Microsoft discontinued the application
  3. It was Windows-only and I started to partially switch to Apple
  4. Quicken was more "industry standard", more widely supported
Quicken + Neat Receipts Isolating the right receipt in a batch image of receipts was not ideal and I was not OCRing the images. I would tag file properties with tags to aid in search but it was less than ideal. I started using Neat Receipts (Mac version) and was very impressed. Scanning receipts individually was not appealing initially but was much easier than a flatbed scanner and the OCR was good enough to usually pick out the vendor, price and other fields automagically. All the receipt images were in a searchable, organized database file that I split up by month.

During this time I also went through various conversion pains in transitioning from Quicken Windows to Quicken Mac 2007 and finally to Quicken Essentials for Mac. Each version had various pros and cons and transitioning the data between versions was not smooth by any means.

The desire for more

Neat Receipts was nice but I still had frustrations:
  • Scanning receipts took more time than I'd like
  • Image cropping and receipt data correction / entry took some time
  • Despite toting Quicken export features, it didn't work on Mac and Windows support looked less than ideal. This meant performing dual data entry in both systems for some of the same data
  • Receipt database files were not small. I decreased the resolution but could still see storage being a problem long-term.

On the Quicken front, Quicken Essentials was more limited than its predecessor but at least it was a native, modern app and it worked for my basic needs. Entering a bunch of receipt transactions was still tedious though.

While I realize transactions can be downloaded from financial institutions into Quicken, I find that better suited for initial account setup. Otherwise it defeats much of the idea of reconciliation to me and in the past I have seen it cause problems (duplicate data and more). If I'm staying on top of things, my local data is usually more current than my bank's site anyway. Finally my receipts and local data tend to be more detailed and descriptive than what I would get from the bank. - Your Personal Financial Assistant ("where receipts go") is sort of like the Netflix model for receipts. You mail them an envelope of receipts or send them receipt images and they:
  • Scan and/or OCR the images
  • Manually check and correct receipt data (i.e. someone reviews, will add hand-written tips to totals, etc.)
  • Upload receipt images and data to your secure account accessible via web and mobile phone
  • Automatically categorize receipts and allow you to change, provide rules
  • Shred the originals or return them depending on your preference
  • Provide export functionality, search and much more
The service sounded ideal as it was like having a personal financial assistant to do the grunt work at a fraction of the cost. While it caters more to business use, I found its Lite plan to be reasonable enough for me to try it for personal use.

The below video has a short overview of the service; it is a bit older so the current web app has many more features. There is a longer, perhaps better demo video here though it is more out-of-date.

Evaulating Shoeboxed Costs

After checking out Shoeboxed price plans I was a little turned off. However an annual plan of the Lite account is $99/yr and I consider that reasonable if the service provides the value I expect. I estimate it may save me 1 to 2 hours per week or so in scanning and digitally organizing receipts and importing that transaction data into Quicken. Combined with a nice export to Evernote and other features, I expect it to save more time throughout the year in searching and using that data. I'm guessing it saves me 100+ hours per year at a cost of less than $2 per week. I think the cost may be worth it as it helps me manage my finances and my time is valuable and is better spent elsewhere.

With the Lite account there are some additional costs such as postage (upgraded plans come with prepaid envelopes) if you use mail-in. There is also a slight charge per receipt if you go over the limit of 50 receipts per month and I usually have 45-70 or so each month. I do feel they should bump up the receipt limit for the Lite plan to at least 75 or 100. However with the Lite annual option you get an extra 250 receipts which minimizes or eliminates that. Additionally you can upload receipts yourself that do not count towards the limits and they provide a 30 day risk-free trial so it seemed worth evaluating at least.

Trying Shoeboxed Mail-In

After signing up for a Lite trial, I first printed off address labels to make mailing the envelopes easier since this plan didn't include prepaid envelopes. You also have to include some user details so they know which account the receipts are associated with so I created labels for this as well (not necessary w/prepaid envelopes in upgraded plans). I mailed in my first batch of receipts on a Monday; they received by late Wednesday and had the receipts processed by the weekend.

I wish the turnaround time was a little better but this was expected with the Lite account, standard postage, and the initial mail-in. Considering I'd generally want to wait until receipts collect a bit before mailing them, this did mean this was not going to be the fastest solution. In practice, receipts generally sat on my desk a few days anyway before I dealt with them and there is always the option of more express mail.

To really get the speed I'd like with the limitations removed I would need to upgrade to the Classic plan that carries more sticker shock at 3 times the cost. Looking at in from an annual plan subscription though, that's around $5 per week. That's still not bad considering the time it saves and value it provides, and considering you certainly could not pay an assistant to do this cheaper/better.

Other ways of sending receipts faster

Mobile option - Shoeboxed membership also comes with a mobile option that allows you to take a pictures of receipts and email them to shoeboxed for faster processing. This is intended more for mobile phone use but it works just as well on the computer. Obviously they will receive the receipts near instantly unlike snail mail and they appear to process these within one business day. In fact my initial receipt email test was completely processed within 30 minutes. These receipts do count towards your monthly limits however as they perform the same OCR, manual review and storage process as the mailed-in receipts. The other drawback is the quality of the receipt images taken via your camera will typically not be as good. Finally I noticed if I emailed the receipt in the wrong orientation (typical from a phone) they did not rotate it for me but all the data was correct.

Manual upload - Another method is manual upload of a receipt image to Unfortunately this will not perform any automatic OCR similar to Evernote or Neat Receipts. It will however automatically categorize the receipt if the vendor you supply is in their database or is already listed in your stores. The other difference is these receipts will not count toward monthly limits. Otherwise everything with the receipt is identical within the system.

Shoeboxed applications

I found the website to work pretty well. Layout, image preview and data entry were logical and generally snappy.

There are a few things on I'd like to see added/changed:
  • Basic image editing - i.e. add crop and rotate, especially for images taken via camera and emailed in. Their enhanced manual uploader does have rotate features though.
  • Gallery view - it would be nice to see a visual thumbnail style preview of all the receipts (can get via Evernote export though)
  • Site speed - occasionally the image preview took a little longer than it should (Flash based now for zoom, print and more imaging features)
  • Tags - categories and notes are nice but assigning tags would be handy
  • Additional export functionality - Such as assigning tags in Evernote export and more current Quicken support (more on that in a moment)

The is also an official iPhone app available that I have not tried due to my switch to Windows Phone 7 (WP7). Shoeboxed has an API and I might consider a WP7 app if I continue use of the service.

Exporting the data from Shoeboxed to Quicken

Getting my receipt transaction data into Quicken without manual data entry is just as important to me as getting at the receipts themselves or the extracted receipt data in another system. This is where I ran into the first roadblock. Shoeboxed has an export to Quicken but it is in an old QIF format that Quicken has not supported in some time. Unless you have a very old version of Quicken this is rather useless best I can tell and is surprising for a relatively new service such as Shoeboxed. I have emailed Shoeboxed asking them to add QFX file support (Quicken's version of OFX) in hopes they might address this.

It appears sadly that even if shoeboxed provided an OFX format (or I converted QIF->OFX somehow), that Quicken may artificially cripple OFX import unless it detects it came from a supported bank. In short, Quicken sucks on Mac, Intuit appears greedy, their drop of QIF support has caused a lot of people grief, and any current version of Quicken apparently only wants to allow import from a bank or another version of Quicken. Note to Intuit: You are on my greylist. Note to Microsoft: Revive Money! Note to industry: Provide us with an alternative! Note to me: Switch back to Quicken for Windows?

In the meantime Shoeboxed does point to a Cash account and transfer workaround for Quicken. That unfortunately doesn't work with Quicken Essentials. I just "tried it" in Quicken 2011 Deluxe for Windows (there is no trial, only money back guarantee) and the workaround does work there. It's still a few steps to import that into a Cash account and then move those transactions to Checking and it seems like a very artificial limit but it's better than nothing. Looks like Quicken Windows is now my future again. The Windows version is much better but it's a downer having to switch between 2 operating systems more often now.

A script to import the data into Quicken?

As hopefully a stop-gap measure I wrote the below AppleScript to attempt to automate taking CSV data exported from into Quicken Essentials for Mac. It works by activating Quicken and Excel, grabbing the receipt data from Excel, and switching to Quicken to type in the data. A modified version of this could be used with Quicken for Mac 2007. On Windows a similar process could be done with Powershell for example if needed there.

I took this approach as it was the quickest and easiest method of ensuring the data was entered correctly. The actual quicken files are proprietary / closed and converting other Shoeboxed exported data into a QFX file format would have been more work. This way the script doesn't have to worry about file formats or I/O, it just transfers data between two running apps.

There are a few assumptions and limitations with the script and some of those are noted following the script code. Also, this is my first AppleScript and a first pass so there is certainly room for improvement. I was pleasantly surprised at how English-like AppleScript is and how much worked based on my assumptions without having to look up syntax.

global gExcelRowNumber 
global gExcelColLetter 
global gExcelCellId 
global gExcelCellValue 

global gCreditCardEndsWith 
set gCreditCardEndsWith to "1234" 
global gShowSummary 
set gShowSummary to true 

-- note: tell blocks don't appear to work with variable names correctly ('identifier / end of line'). single line appears okay 
-- set QUICKEN_APP to "Quicken Essentials" 


on menu_click(mList) 
	local appName, topMenu, r 

	-- Validate our input 
	if mList's length < 3 then error "Menu list is not long enough" 

	-- Set these variables for clarity and brevity later on 
	set {appName, topMenu} to (items 1 through 2 of mList) 
	set r to (items 3 through (mList's length) of mList) 

	-- This overly-long line calls the menu_recurse function with 
	-- two arguments: r, and a reference to the top-level menu 
	tell application "System Events" to my menu_click_recurse(r, ((process appName)'s  
		(menu bar 1)'s (menu bar item topMenu)'s (menu topMenu))) 
end menu_click 

on menu_click_recurse(mList, parentObject) 
	local f, r 

	-- `f` = first item, `r` = rest of items 
	set f to item 1 of mList 
	if mList's length > 1 then set r to (items 2 through (mList's length) of mList) 

	-- either actually click the menu item, or recurse again 
	tell application "System Events" 
		if mList's length is 1 then 
			click parentObject's menu item f 
			my menu_click_recurse(r, (parentObject's (menu item f)'s (menu f))) 
		end if 
	end tell 
end menu_click_recurse 

to set_cell(rowNum, columnLetter) 
	set gExcelRowNumber to rowNum 
	set gExcelColLetter to columnLetter 
	set gExcelCellId to gExcelColLetter & gExcelRowNumber as string 

	tell application "Microsoft Excel" 
		tell active sheet of active workbook 
			cell gExcelCellId 
			set gExcelCellValue to string value of cell gExcelCellId 
			select range gExcelCellId 
		end tell 
	end tell 

	return gExcelCellValue 
end set_cell 

on send_value_to_quicken(valueToSend, sendTab) 
	--display dialog "sending " & valueToSend & " to quicken" 
	tell application "Quicken Essentials" to activate 

	tell application "System Events" 
		keystroke valueToSend 
		-- decreasing the delay results in faster processing but may mess up the data 
		-- this is especially true for the way quicken handles the Payee column 
		delay 0.3 

		if sendTab is equal to true then 
			keystroke tab 
			delay 0.3 
		end if 
	end tell 
end send_value_to_quicken 

set FileToOpen to choose file with prompt "Select CSV file" of type {"CSV"} 

tell application "Microsoft Excel" 
	open FileToOpen 
end tell 

-- current personal quicken column order:  
--	Date, Action (Debit etc.), Payee, Category, Payment, Deposit, Balance, Reconcile, Memo/Notes 

-- storeboxed csv order:  
--	Date	Store	Note	Total (USD)	Tax (USD)	Payment Type	Receipt Type	Category	Receipt 

set row_num to 2 
set last_row to 2 

tell application "Microsoft Excel" 
	set last_row to ((count of rows of used range of active sheet) + 1) 
end tell 

set entered_count to 0 
set skipped_cc_count to 0 
set total to 0 

repeat until row_num = last_row 
	set_cell(row_num, "F") 
	set isCreditCard to false 

	if gExcelCellValue contains gCreditCardEndsWith then 
		set isCreditCard to true 
	end if 

	if isCreditCard is equal to false then 
		-- date column		 
		set tran_date to set_cell(row_num, "A") 

		-- action column (leave as Debit for now, add support for ATM or other later perhaps) 
		set tran_type to "Debit" 

		-- store / payee / vendor 
		set tran_vendor to set_cell(row_num, "B") 

		-- shoeboxed note / comment  
		set tran_note to set_cell(row_num, "C") 

		-- category. may be empty		 
		set tran_category to set_cell(row_num, "H") 

		-- amount (payment)		 
		set tran_amount to set_cell(row_num, "D") 
		set total to total + tran_amount as real 

		-- memo / notes (receipt url)		 
		set tran_receipt_url to set_cell(row_num, "I") 

		set tran_memo to tran_receipt_url 

		if length of tran_note is greater than 0 then 
			set tran_memo to tran_note & "  ==> " & tran_receipt_url 
		end if 

		tell application "Quicken Essentials" to activate 
		menu_click({"Quicken Essentials", "Transactions", "New Transaction"}) 

		-- after starting a new transaction we need to pause to ensure quicken is ready to accept our input 
		if entered_count is equal to 0 then 
			delay 1.2 
			delay 0.85 
		end if 

		send_value_to_quicken(tran_date, true) 
		delay 0.15 
		send_value_to_quicken(tran_type, true) 
		send_value_to_quicken(tran_vendor, true) 

		delay 0.25 

		-- category. if there use it, otherwise accept quicken default and tab out 
		if length of tran_category is 0 then 
			send_value_to_quicken(tab, false) 
			send_value_to_quicken(tran_category, true) 
		end if 

		-- category can be a bit slower  
		delay 0.25 

		send_value_to_quicken(tran_amount, true) 

		-- deposit		 
		send_value_to_quicken(tab, false) 

		-- memo / notes (receipt url) 
		send_value_to_quicken(tran_memo, true) 

		-- tags 
		send_value_to_quicken("shoeboxed", true) 

		-- commit / save the transaction 
		send_value_to_quicken(return, false) 

		set entered_count to entered_count + 1 
		set skipped_cc_count to skipped_cc_count + 1 
	end if 

	set row_num to row_num + 1 
end repeat 

if gShowSummary is equal to true then 
	delay 0.3 
	tell application "Quicken Essentials" to activate 
	display dialog (("Entered " & entered_count as text) & " receipts totalling " & total as text) & ". Skipped " & skipped_cc_count & " credit card entries" 
end if 

Script limitations, assumptions and notes:
  • Verify, correct data if needed on first, then export to CSV.
  • Lack of true AppleScript support in Quicken Essentials means this is far from foolproof.
  • Script adjustments must be made if your Quicken Essentials Register columns view settings (columns and order) are different than mine (likely are).
  • For password protected Quicken Essentials files you'll need to open Quicken Essentials first before running the script.
  • The script currently assumes you are already within the appropriate register view of Quicken Essentials (i.e. Checking).
  • Script assumes transactions being entered are not already in Quicken Essentials
  • Timing issues are possible. Delay statements had to be added to given Quicken Essentials time to react to the previous keystrokes before sending the next keystrokes. How long those delays need to be can vary by machine. Too little delay and you may be in the wrong field, too much delay and the script runs slowly.
  • No real error handling is built into the script. While running, if a timing issue happens, a system popup appears at the wrong time, or you start switching windows or typing, unpleasant results can occur.
  • It's best to move the Action Script editor to another area where the script can easily be stopped if needed.
  • While it is easy enough to delete transactions created by the script (sort by Date Entered), backing up the Quicken file first isn't a bad idea. Likewise start with a small number of transactions.
Important conclusion: While this script worked for some exported transaction batches it did not work for others and is unreliable at best without further tweaking.

Download: QuickenImport.applescript.txt _expenses_demo.csv

The below video shows the script in action. While it is hard to make out much detail it does give some idea of the process, speed and occasional success. It is worth noting that the script usually runs faster but was further delayed for the purposes of video recording.

Completing the picture with Evernote

Shoeboxed and Evernote seemed more like competition originally but I was glad when they teamed up. Shoeboxed handles the paper, OCR, receipt data extraction review/correction, automatic categorization, storage, organization and more. Evernote overlaps in the area of OCR but provides a much better search of the OCR'd text data in the receipt image. Since Evernote is more general purpose it doesn't have Shoeboxed's receipt and finance specific features but it compliments it well with search, tagging and more. The Shoeboxed export to Evernote worked well, I just wish they would add the ability to add tags and specify the notebook. Considering they appear to be exporting via email this would be easy to do as Evernote email allows this to be specified in the subject line.

Click for larger view

A custom receipt scanning and uploading application

At this point in my trial I realized that Shoeboxed mail-in is great for organizing receipts but I could not afford to wait a week+ to get those transactions into Quicken. I liked the idea of emailing the receipts to Shoeboxed but not the idea of using a camera to take pictures of paper receipts, which often doesn't work well. I considered manually entering receipts into Quicken as they arrived and then mailing the receipts to Shoeboxed with no real rush on delivery and processing of the images. I liked the Neat Receipts scanner but not correcting scanned images and OCR'd text or storing the data locally in an isolated store.

In an attempt to somewhat combine the best of the different options, I created a quick-n'-dirty Windows scanner / uploader app last weekend based on the .NET TWAIN image scanner CodeProject application. It scans and saves the receipt images (or allows opening existing images) and sends them to Shoeboxed and/or Evernote via email. This allows Shoeboxed to get and process quality receipt images very quickly. That in turn means that data can be extracted quickly back into Quicken, Evernote, and/or other systems.

This does mean I was back to scanning receipts again. However I was able to use the Neat Receipts mobile scanner with the app via TWAIN and that scanned and auto-cropped the receipts perfectly, returning the images without having to use NeatWorks (which does still need to be installed for drivers etc.). Moreover it meant OCR data extraction could be offloaded to Shoeboxed without NeatWorks guessing and me correcting / finishing. I could certainly avoid a custom app and just use a flatbed scanner and an email client. Receipt scanners are more convenient though, printer/scanner hardware/software is sent from hell, and the custom app provides more control for a smoother, more automated workflow.

Selecting scanner source is a one-time step:

NeatReceipts TWAIN Scanning Dialog. Changed Color to B&W, crop to Auto Crop on 1st run:

App auto-saves, provides basic image management and upload features (click for large view):

Send allows various options for Shoeboxed and/or Evernote (click for large view):

Download: Source App (.NET framework 4.0 is required)

App notes:
  • Evernote: Sending to Shoeboxed + Evernote means the receipts do not have to be exported to Evernote from Shoeboxed later. However doing that before Shoeboxed has performed its processing means the receipt data will not be there to describe it well unless it is manually entered.
  • Scanning technology: I looked into WIA as TWAIN is old as dirt but I did not have much luck with my initial quick attempt. I have worked with Atalasoft imaging controls in prior consulting and they work great but are too expensive for personal use. I am not aware of a similar free, more modern alternative.
  • Receipt size: One of the disadvantages of scanning with this app is long receipts over 11.6" tall may get cut off. This was the case for NeatReceipts TWAIN scanner anyway and I believe scanning via NeatWorks allows longer receipts. mail-in can handle much longer receipts than either.
  • Email: The app will batch receipts together in consolidated emails where possible, when tags and notes are the same (otherwise different subject lines are needed). Evernote benefits more from separate emails as it will lump multiple receipt image attachments in a given email into a single note which I find is not ideal.

Ideas for the future

  • NeatReceipts API: I looked at Neatworks.dll in Reflector and it might be possible to use it outside of NeatWorks to take a 1st pass stab at OCR which could provide some default notes / titles for Shoeboxed and Evernote, with those systems doing the rest of the OCR. I'm sure NeatCo would consider this disassembling / reverse-engineering and it'd likely be fragile but this hacking could be beneficial from the scanner/uploader app.
  • Handyscan: I just came across Handyscan for Windows Phone 7 and while it uses the phone's camera to capture receipts, it certainly looks much better than trying to take a picture of the receipt with the phone. It allows crop, adding text, zooming, adjusting size/quality, sending receipts and more.
  • Custom scanner/uploader app enhancements: I need a name for this app. It could use a rewrite in WPF, image zoom and crop, shoeboxed/evernote API integration and a variety of other changes.
  • Semi-automated exports: Right now most of my automation is on the side of sending receipts. Once they are received and processed by Shoeboxed though, it'd be nice to get notified of that (or periodically poll for it) and automatically export data out of Shoeboxed for Quicken and Evernote. That would likely require tapping into Shoeboxed and Evernote APIs and doing some polling in the scanner/uploader app or creating a background service.
  • Windows Quicken QIF Import automation: The workaround to import QIF files into Quicken checking accounts will get old. This could be semi-automated with different frameworks / techniques such as via PowerShell or Microsoft's UI Automation Library.
  • Windows Phone 7 App: Either a Shoeboxed WP7 app using their API or more general receipt app with Shoeboxed + Evernote.


Currently I'm sticking with the Lite annual plan of Shoeboxed and sending most of my receipts via the custom scanner/uploader app and Neat Receipt's mobile scanner. I may have to upgrade to Shoeboxed Classic later depending on how much limitations end up impacting me. Longer receipts and some other financial docs I'll send via mail. For some shorter receipts when I'm on the go I may snap a picture and email it in and get rid of the receipt right there. For now Shoeboxed exports to Evernote and Quicken will be a semi-manual process. I'm retiring Quicken on the Mac and replacing it with the superior Windows version and mostly retiring NeatWorks.

Portions of these processes may seem like overkill to some and depending on the situation of others it certainly may be. I admit to being somewhat OCD in this regard but I cannot make good decisions with bad data, I like to stay organized and I hate paperwork. If you have a small number of financial transactions this may not be worth it and likewise if you are on a cash system for budget reasons or if you charge everything to a credit card and pay it off each month. Other processes might be a better fit for some such as just relying on the bank's data or keying in receipts into a mobile phone, discarding them and syncing them to a computer at home.

Pros / Cons
Tools and techniques described in this post have various pros/cons to weigh:

  • Offloads much of the work of receipt scanning, OCR'ing, data extraction and categorization
  • Can offload the work of entering many/most transactions into Quicken or similar
  • Receipt transaction data can be exchanged between various different systems
  • Helps drastically reduce paper clutter of receipts and related docs
  • Provides well organized and searchable receipts and financial transactions
  • Frees you from having to store receipt images locally
  • Can help provide a clearer picture of finances and ability to manage them better
  • Receipts can assist in reconciling, returns, warranties, price matching, taxes, reimbursements, rebates, insurance and more

  • If you are overly paranoid about security this might not be for you. It is worth noting that Shoeboxed employs bank-level security and Evernote utilizes SSL for paid plans. Also by law receipts cannot have full account numbers, SSNs and the like and most receipts are likely not sensitive.
  • There is a time/effort hit to this sort of work though most of it is one-time setup. Afterwards it is more automated but still more work than if you were doing little to begin with.
  • If you are in a hurry, Shoeboxed mail-in turnaround time can be a problem, perhaps even with their Classic account.
  • Shoeboxed -> Quicken data transfer only works on certain old versions or only on Windows with an awkward workaround.
  • There are costs to Shoeboxed and some Evernote plans as well as receipt scanners, software such as Quicken and the like. In my case they are negligible for the benefit but that will vary by person.
  • "Outsourcing" some of this work creates 3rd party dependencies which could negatively impact you if they make changes
  • Shoeboxed hasn't been great about responding to my inquiries via form/email though I somewhat expected that with a Lite account. They did eventually respond to one, silent so far on a couple others. To be fair they do have live chat and phone support and decent FAQs and documentation but email response should be quicker.