Hi,
I have read the Beemind Your Writing blog post, and did not find a way to beemind writing using Microsoft Word.
So I thought about it, and here is the one that worked for me:
A keyboard shortcut in word will save the word count into a dropbox folder. IFTTT will send the wordcount to a beeminder goal.
Create a Macro with a keyboard shortcut in Microsoft Word:
1. Record Macro -> keyboard
2. Assign : ctrl + D (or any other shortcut that you want, but beware that it is not used by Word. Try the shortcut and it should not do anything before creating this macro)
3. Type something
4. Stop recording macro
5. Macros -> Click on Visual Basic
7. Your macro will be at the end
8. Delete the code that is generated from your typing
Put instead the following code:
Dim TextFile As Integer
Dim FilePath, FolderPath As String
Dim wordcount As Long
wordcount = ActiveDocument.Range.ComputeStatistics(wdStatisticWords)
'What is the file path in your dropbox account?
FolderPath = "E:\internet related\Dropbox\word_count\"
FilePath = FolderPath + Str(wordcount)
' Delete all files inside that folder, so you will write the new file with the latest word count
Kill FolderPath + "*.*"
TextFile = FreeFile
'Open the text file
Open FilePath For Output As TextFile
'Save & Close Text File
Close TextFile
Create an IFTTT goal:
Dropbox when a new file created inside a subfolder -> Beemind the file name
I hope it is useful for folks using Word.
Update
I have made few changes to the code to make it works as differential word counter. It will count the number of words typed after your last macro run.
This mode has several Pros over the older code which beeminded the cumulative total word count of the file.
Pros of differential word counter vs cumulative
- Can work on multiple word files with only one writing Beeminder goal. Even if the word files have different folder paths. This method depends on using Macro that is available everywhere when you work on your Word application, and not on the path of your word file.
- Can work when you want to continue writing, even if the writing project started before creating the beeminder goal, and your intention to beemind your effort every session, rather than the total word count of the word file.
- If you copy paste a chunk of text and do not want to include it in your word count, you can copy paste it -> save word and exit -> open it again (it will reset the differential count and you can continue writing and effectively skipped beeminding that pragraph that you have pasted
- A one line code can be uncommented to ignore negative wordcounts, in case that is desirable when you want to ignore deletions. Please remember to run the macro after deleeting a significant chunk of text so that it will count your typing after that deletion.
You can find the code here with Readme file how to use it.