1.Introduction

Text-Effect-AutoCorrection is a Microsoft Word add-In and it can correct sub/super scripts, upper/lower case typos using built-in/user-defined/user-provided databases. Theoretically, what this add-in acturally do is simply find and replace.

Original cod H2O m3/d PO43- dn300 5KW CODMn
Corrected COD H2O m3/d PO43- DN300 5kW CODMn

2.Requirements

Word 2016 or greater on Windows system

Word for Mac has not yet been tested

Word Online is not supported at this moment, but we will work on it.

3.Usage

3.1 Get the add-in

There are two ways to get this add-in

A. Via Office Store (Recommended for all users)

Link to Office Store https://store.office.com/-WA104379996.aspx

  1. Click on the above link and, in the top right corner, click Sign in.
  2. Type the email address and password you use with Office/Microsoft.
  3. Click on the “add” button after login.
  4. The next page you will see will show that you have successfully added this add-in to your account.
  5. Now go to Word 2016.
  6. Open Word 2016 and, in the top right corner, click Sign in.
  7. Type the email address and password you use with Office/Microsoft.
  8. Insert Tab > My Add-ins.
  9. In the Add-ins for Office box, find “text effects autocorrection”. If you don’t see it, verify that you’re signed into Office. Press Refresh to update the list.
  10. If the add-in still doesn’t show up in the add-ins for Office list, check if you are using Word 2013 which is not supported by this add-in.
  11. Double-click the add-in to start it.
  12. Now you are ready to use this add-in.

B. Via Shared Folder (Recommended for advanced users or developers)

  1. Create a folder on a network share, for example \\MyShare\MyManifests.
  2. Put the manifest file in this file share.
  3. Open a new document in Word 2016 (or newer).
  4. Choose the File tab, and then choose Options.
  5. Choose Trust Center, and then choose the Trust Center Settings button.
  6. Choose Trusted Add-in Catalogs.
  7. In the Catalog Url box, enter the path to the network share you created in Step 1, and then choose Add Catalog.
  8. Select the Show in Menu check box, and then choose OK.
  9. After performing these steps, you can select My Add-ins on the Insert tab of the ribbon and then choose Shared Folder at the top of the Office Add-ins dialog box to insert a task pane or content add-in from this catalog.

3.2 Use the add-in

text-effect-autocorrection screenshot

From the above figure of version 1.3.0.0, you may see this add-in contains SECTIONS A-F.

SECTION A: Name for this add-in.

SECTION B: Short introduction to this add-in.

SECTION C: Database section.

SECTION D: Go button section. This add-in will start running when you click on this button.

SECTION E: Error message section. Error message will appear here if there is one.(SECTION maintained but error message will not appear in this area per Version 1.3.1.0.

SECTION F: Copyrights, author and version information of this add-in.

4.Databases

Currently, databases built-in are as follows

4.1 Built-in database

Currently, there are several built-in databases, standard, chemical, unit, water and wastewater engineering. Built-in Database source file can be found here

4.2 User defined database

If you don't think the built-in databases are good enough for you, don't worry, you can create your own databases, and creating one is easy.

Within minutes, you can define a new database using tools provided by text-effect-autocorrection add-in. Check the "user defined" checkbox in SECTION C(see the above figure), and you will see it.You can also export your defined database and save it for later use.

It is recommended that you read '4.4 How database works' to have a basic understanding of the idea of a database.

4.3 User provided database

A great thing of this add-in is that you can provide your own database. You can also share your database with anyone else if you'd like to.

Check the "user provided" checkbox in SECTION C(see the above figure), and a textarea which can accept your database will appear.

You may either use the database exported from 'user-defined database tools' or write one by your own. The only thing that you need to do is to copy and paste the exported database.

4.4 How database works

A database is a javascript object or JSON file, Microsoft Word will search strings match certain pattern and replace them to correct forms.

If you chooes to write a database completely on your own. Your database should follow this schema. 'Exported' database already followed this schema. Note, this schema is still incomplete, we are still improving it.

Here are some examples, and these examples are in javascript object format.

Example 0

In Example 0, you can see 5 keys : "s1" "s1Opt" "s2" "s2Opt" "to".

Key1:s1(search 1) | String type | Mandatory

Options are exactly the same with Microsoft Word "search" options. Note that, several other options for instance, matchCase can not be checked when matchWildCards checked.

Example s1.1 {s1:"cod",s1Opt:{matchCase:true},to:"COD"}

In Example s1.1, this add-in will search lower case "cod" in Word document and replace "cod" with "COD", note "cOd" or "Cod" will not be replaced.

Key2:s1Opt(search 1 options) | Object type | Mandatory

Example s1Opt.1{s1:"cod",s1Opt:{matchCase:false},to:"COD"}

In Example s1Opt.1, this add-in will case insensitively search "cod" in Word document and replace "cod" with "COD", note "cOd" and "Cod" will also be replaced.

Example s1Opt.2{s1:"[cC][oO][dD]",s1Opt:{matchWildCards:true},to:"COD"}

Example s1Opt.2 is more or less the same with Example s1Opt.1, it will also case insensitively search "cod" and replace "cod" with "COD" but in a different manner. This example take advantages of wildcards search of Word. If you want to know more about wildcard search in Word, see here.

Accepted Options
Option Key Option Value Description
ignorePunct true/false Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box.
ignoreSpace true/false Gets or sets a value that indicates whether to ignore all white space between words. Corresponds to the Ignore white-space characters check box in the Find and Replace dialog box.
matchCase true/false Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box (Edit menu).
matchPrefix true/false Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box.
matchSoundsLike true/false Gets or sets a value that indicates whether to find words that sound similar to the search string. Corresponds to the Sounds like check box in the Find and Replace dialog box
matchSuffix true/false Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box.
matchWholeWord true/false Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box.
matchWildCards true/false Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box.

Key3:s2 | String type | Optional

This add-in will search "s1" first with "s1Opt" option, and if "s2" present, add-in will search "s2" from "s1" search results.

Example s2.1

{s1:"[dD][nN][0-9]", s1Opt:{matchWildCards:true}, s2:"dn", s2Opt:{matchCase:false}, to:"DN"}

Add-in will first search for "[dD][nN][0-9]" using wildcards match, if found, this add-in will then search for "dn" case insensitively from previously found results, and replace it with "DN".

Key4:s2Opt | Object type | Optional

See Key2:s1Opt, but this one optional. Note, if "s2" is present, "s2Opt" then become mandatory.

Key5:to | String type | Mandatory

Replace "s1" or "s2" with "to" or format "s1" or "s2" as super/subscript.

Note, "$superscript" and "$subscript" are reserved strings in this add-in.

Example to.1

{s1:"[dD][nN][0-9]", s1Opt:{matchWildCards:true}, s2:"dn", s2Opt:{matchCase:false}, to:"DN"}

dn100 ---> DN100 | Dn20 ---> DN20

Add-in will first search for "[dD][nN][0-9]" using wildcards match, if found, this add-in will then search for "dn" case insensitively from previously found results, and replace it with "DN".

Example to.2

{s1:"m3/d", s1Opt:{}, s2:"3", s2Opt:{}, to:"$superscript"}

m3/d ---> m3/d

Add-in will first search for "m3/d", if found, this add-in will then search for "3" from previously found results, and format "3" as "superscript".

Note, currently, only "$subscript" and "$superscript" are accepted format indicator, other strings will be treated as normal strings and works as Example to.1 .

5.Improvement Plan

In order to improve the performance of this add-in and users' experience, we hope that you could share your defined database with everyone else . If "participate improvement plan" checkbox in SECTION B checked, this add-in will automatically send your defined database to text-effect-autocorrection server which later may become part of the built-in databases.

Note, by default, "participate improvement plan" checkbox is checked, meaning you are participating this plan by default. If you don't want to participate in this plan,simply uncheck this checkbox.

5.Privacy

Text-Effects-AutoCorrection Add-In will not collect and/or transmit user's document content. As the Text-Effects-AutoCorrection is an open-source project, you may check source code if you want, click the above "view on Github" button for more information.Baidu Tongji (similar to Google analytics) scripts is added for website analytics.

If you choose to participate in the improvement plan, this add-in will collect the database you defined, and store in the server and later may become part of built-in databases. Read the previous section for more information about this plan.

6.Disclaimer

Use at your own risk. Backup your documents before using this add-in.Text-Effects-AutoCorrection Add-In may still contain bugs .

7.Authors and Contributors

Text-Effects-AutoCorrection is created and currently being maintained by @he-yang , if you are interested in contributing to this add-in, pull a request (e.g. improve code, share your database, make translation), or simply send an email to he.yang at wtsolutions.cn

8.Support or Contact

Still have questions? Please report here. You can also comment below.

9.Change Log