none
Anyone want VBA project code for an unfinished Word add-in for AutoCorrect utilities? RRS feed

  • General discussion

  • Back in 2006 I created a Word add-in that displays a toolbar with one-click options related to AutoCorrect. I thought I might publish someday but then time passed...  I am wondering if anyone would like my raw code. A fair amount of it was actually borrowed from other sources that made it freely available, and I believe I have comments in the code that say where it came from.

    I'm turning my attention to Montessori teaching now and I just don't have time to program anymore. If you're interested, let me know. The catch is that I won't be able to answer many questions, especially if I have to read the code myself to figure out the answer. It has been 7 years, and I don't remember.

    If you end up making a bunch of money off it someday, please consider donating to my school fund. (I want to promote and possibly start Montessori and/or democratic free schools.) 

    My intention was to make it into a real, compiled add-in of the type that would be registered with Windows, a COM thing. Unfortunately, I didn't know much about COM and I didn't get all that far, but I did manage somehow to get to the point of registering it in Windows XP and I used it that way for awhile. Occasionally the registered version I had gave me some problems (I think it involved annoying messages about saving the template when I tried to close Word), so I unregistered it. In other words, it's a bit buggy. However, it can also be used (at least in Word 2003) simply by opening a new document based on the Word .dot file where the original code is. The toolbar and what it does is the whole point of the thing.

    Today I opened my old .dot file with all the VBA code in Word 2013. The toolbar did not appear (it does in 2003), but the code for importing the AutoCorrect entries I had just exported from 2003 worked (which is fantastic because now I can use all my old AutoCorrect entries).

    Here is what the buttons on the toolbar (and VBA code behind them) does (or is supposed to do; I haven't tested much in 2013):

    1. Jump straight to the AutoCorrect tab of the the AutoCorrect dialog box.

    2. Pop up a form allowing you to look up a word or phrase RESULT within AutoCorrect, which shows the "replace" string along with it. For example, I added shortcuts via AutoCorrect for the word "children" such that I can type "chldrn", "cren" or "crn" and AutoCorrect will change each of those into the word "children." If I were to forget whether or not I had any AutoCorrect entries resulting in "children," all I would have to do is click "Lookup" on my toolbar, type in "children", press Enter, and a list showing those three abbreviations will appear.

    3-5. Add the suffixes -ing, -s and -ed intelligently, mainly useful for root words already in AutoCorrect. The best way to explain is with an example. If you have AutoCorrect change "bx" to "box", this actually happens when you type a space or certain punctuation marks after it (period, semicolon, etc.) That means if you want to end up with "boxes", typing "bxs" won't work (unless "bxs" is defined separately as "boxes".) But if you use my toolbar, you can type "bx" and instead of typing a space, click the "-s" button. The intelligent part of it is that it will give you "boxes", not "boxs". You can also type "bx" followed by Alt+s if you don't want to use the mouse.  Likewise, type "bx" and click the "-ing" button to get "boxing" (or Alt+g), or type a word like "beg" and the "-ing" button to get "begging" (not "beging).  I haven't tested this on every root word in the English language, so it may need fine-tuning, but the general concept works.

    6. Append a 2-column list of desired AutoCorrect entries into the AutoCorrect entries already in Word.

    7. Back up your AutoCorrect entries by writing them to a 2-column Word document (which can then be imported via the previous button, #6 above).

    8. Remove certain punctuation marks from the middle of a word. Let me explain by example: I have AutoCorrect expand "edu" to "education". But what if I want to type "educational"? Nothing is in AutoCorrect that results in this word. If I type "edu[al", Autocorrect immediately changes the "edu" part to "education" when it sees the bracket "[" and then I end up with "education[al". This toolbar option simply looks for a left bracket (and also "<") in the middle of a word and takes it out.

    9. Delete AutoCorrect entries from a list so that you don't have to do it one by one. This is useful if you want to get rid of the same AutoCorrect entries on multiple computers (or if you are testing your VBA code and you want to get rid of some before you add them back again automatically).

    10. A drop-down menu with an option to go to online help (which doesn't actually exist) and "About," which pops up a little form saying it's Version 0.1 Beta (though actually it's still Alpha) and giving links to certain pages of my old website, only one of which is actually a valid link.

    Does anyone think these functions are worth developing more?

    Margaret


    Wednesday, July 3, 2013 12:05 AM

All replies

  • Hello,

    Thanks for sharing the VBA project with the community members.

    Since the later versions of Office has released, we can now creating application-level add-in and document-level customization via Office Primary Interop Assemblies in .Net framework. However, if there is someone interested in your VBA project, he/she can migrate those functionalities to a VB.Net Excel Workbook or VB.Net add-in. This may not be a difficult thing.

    Have a nice day!


    Damon Zheng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, July 3, 2013 11:46 AM
    Moderator