Showing posts with label autocorrect. Show all posts
Showing posts with label autocorrect. Show all posts

Sunday, May 16, 2010

Importing Microsoft Word Autocorrect Entries into OpenOffice.org Writer

I had been looking, for some years, for a way to import my list of AutoCorrect entries from Microsoft Word 2003 into the OpenOffice.org (OOo) word processing program.

In Word, I had found AutoCorrect invaluable for converting shorthand expressions into longer terms, saving me a lot of typing. For example, I could type “fttt” and watch it expand to “from time to time,” having previously defined it as such. My list of Word AutoCorrect terms had grown long, into the thousands of entries, so I could not just retype them into OOo Writer manually.

I did know how to export the AutoCorrect entries from Word to a text file. There were apparently several macros available for this purpose. The challenge had been in getting the items from there to Writer. A Linuxtopia webpage now suggested a possible approach, however, and I decided to explore it.

My first step was to get into Writer’s DocumentList.xml file. To do this, in Ubuntu’s Nautilus (i.e., File Browser) I went to /usr/lib/openoffice/basis-link/share/autocorr. I double-clicked on acor_en-US.dat (there were files for other languages and for other flavors of English). There was DocumentList.xml. Now, what to do with it? I right-clicked on it and chose Extract > Extract. This gave me an error message: “Extraction not performed. You don’t have the right permissions.” So I went into Applications > Accessories > Terminal and typed “sudo nautilus,” and then, using that superuser File Browser session, went back to that same autocorr folder and tried again. This time, I didn’t try extracting; I just right-clicked on acor_en-US.dat and chose “Open with Archive Manager” and then right-clicked on DocumentList.xml and chose “Open with” and chose gedit. I went to the end of the file, right before the “</block-list:block-list>” entry, and copied the whole previous entry. In my case, it was the one that would change “yuor” to “your.” In full, it read like this:

<block-list:block block-list:abbreviated-name="yuor" block-list:name="your"/>
They all seemed to follow that same format.  So apparently it was just a matter of getting my Word abbreviations into that form.  To test this, I added an entry right after that “your” entry.  Mine read like this:
<block-list:block block-list:abbreviated-name="yr" block-list:name="your"/>
After making that change, I saved the file.  This provoked a File Roller message:  “Update the file ‘DocumentList.xml’ in the archive ‘acor_en-US.dat’?”  I said yes, i.e., Update.  Then I started Writer and tried typing “yr.”  It didn’t work.  It would correct “yuor” to “your,” but it wouldn’t correct “yr” to “your.”  I rebooted the system, in case that would make a difference, and tried again.  It didn’t.  Yr was still not listed in Writer’s autocorrect replacement list.  I went back and looked at the end of DocumentList.xml.  “Yr” was still there.  Had I not entered it correctly?  It looked like I might have entered it twice, possibly from a previous try at the same thing.  I made sure there was just one entry for “yr.”  Then it occurred to me to delete the one for “yuor” and see what would happen.  Or, even better, I deleted the one for “yr,” the one that I had added, and I changed the one for “yuor” to be for “yr” instead.  I went back into DocumentList.xml but, what’s this, there were two entries for “yr” again.  Then I realized that the file edit time had not changed:  it seemed I was editing and saving the changes, no error messages, but I hadn’t come in as root, so there was not anything actually happening.  Editing as root, I saw another problem:  I had apparently inserted a copy of the list-ending “/block-list:block-list” command before my “yr” entry.  So perhaps Writer wasn’t going beyond that, and this was why it wasn’t seeing the “yr” item.  I made those changes, started Writer, and it worked!  “Yr” became “your.”  I went into Writer’s AutoCorrect options, looked at the end of the list, and sure enough, there was “yr.”

So now the mission was to incorporate a bazillion Word AutoCorrect entries into this DocumentList.xml file.  Or, no, as I thought of it, I decided the first step was to make a backup copy of this xml file and then delete its contents.  I had been working with my Word AutoCorrect list for years.  I didn’t need any surprises from whatever might be in DocumentList.xml.  Actually, to make it easier, I just made a quick copy of the whole acor_en-US.dat file.  Then, in DocumentList.xml, I deleted everything except the file starting and file ending lines:

<?xml version="1.0" encoding="UTF-8"?>
<block-list:block-list xmlns:block-list="http://openoffice.org/2001/block-list">

</block-list:block-list>

Since I would probably be doing this again – adding to the OOo AutoCorrect list from the Word AutoCorrect list, or possibly vice versa – I decided to manage it all through an Excel 2003 spreadsheet.  This, I thought, would also be a good way to compare the AutoCorr lists that I had developed on different computers.  That is, I was using AutoCorrect on more than one computer, and it seemed likely that there would be some cases where those lists were not compatible.  So I began with that part of the project.  I ran the AutoCorrect macro in Word on each computer and brought all of the resulting wordlists together into one folder.  I opened one of those wordlists, copied the whole thing, waited a few minutes to make sure it was all there, and pasted it all into an Excel spreadsheet.  Here, too, I wished the AutoCorrect feature included a column indicating the date last used, because a lot of these entries were totally unfamiliar to me and others were for things I was no longer writing about.  Probably I should have done this spreadsheet thing when I first installed Word.  Then it occurred to me that I could set up a virtual machine, install Word on it, and do something like that now.  But without manual examination, I still wouldn’t be able to tell which of those original Word AutoCorr entries I had ever used.

I did manage to come up with some sorting rules that helped somewhat.  After deleting exact duplicates from the several combined AutoCorr files, I sorted alphabetically according to Value (i.e., the term that resulted from the auto-correction) and then according to value length.  For example, I had given “acl” a value of “actual,” and Word came with “actualyl” as also having a value of “actual.”  I could have left both, but it seemed pretty unlikely that I would let a paper go out with “actualyl” in it (not to mention “additinal” and “adequit”).  Actually, I reasoned, I would rather risk letting a paper go out with “actualyl” in it than to endure the insult of having such a spelling correction in my AutoCorrect file.  So I deleted a bunch of those.  I also searched for items containing a space, since those tended to be from Word, not me (e.g., “witht he” becomes “with the”).  I searched for items of the same length before and after, since these tended to be Word’s typo corrections.  When I was done, I copied and pasted it from the Excel file back into the Word AutoCorr list.  Doing that involved creating a new table with enough rows to accommodate all of the Excel entries, highlighting all those empty cells, and pasting the Excel cells into the highlighted space.  There were some extra rows, which Word redundantly filled by starting over at the start of the table and continuing until all rows were filled; I had to delete those.

The next step was to get rid of the existing AutoCorrect entries in Word, so that the unwanted ones that I had deleted would really be gone.  I did this by creating a Word macro to remove them all.  I had no idea how to do this, but it was easy:  in Word 2003, I went into Tools > Macro > Macros > Create.  It had a space for my new macro, starting with Sub AddTBMenuItem() and continuing on to End Sub.  I pretty much replaced that with the following macro, posted in 2001:

Sub RemoveAllDefaultAutoCorrects()
Dim aCor As AutoCorrectEntry
If MsgBox("This is a very destructive macro. Be sure that you " & vbCr & _
"want to delete all the AutoCorrect entries. There is no " & vbCr & _
"for this action. Click OK to continue", vbCritical + vbOKCancel, "CAUTION") _
= vbOK Then
For Each aCor In Application.AutoCorrect.Entries
aCor.Delete
Next aCor
End If
End Sub

I closed that, went back into Tools > Macro > Macros, selected that new macro entry, and ran it.  I gathered from somewhere that Word would restore the old list if you didn’t replace it with at least one new AutoCorrect entry, so I created a dummy one, exited Word, and then came back in to see what it looked like.  Sure enough, there was only that one dummy entry.  So now I ran the macro to restore my new list, and that took care of getting Word’s AutoCorr list updated.

Now, how to do the same thing in OOo Writer?  Using the format shown in that Linuxtopia webpage, I went back to the Excel spreadsheet, added another column on the right side, and used text concatenation to add all the missing stuff – basically, everything other than “yuor” and “your” in that example.  The formula I used was this:
=”<block-list:block block-list:abbreviated-name=”&CHAR(34)&A4&CHAR(34)&”block-list:name=&CHAR(34)&B4&CHAR(34)&”/>”
CHAR(34) was the Excel command for a regular (double) quotation mark.  I had to use CHAR(34) because the quotation mark means something different.  This formula said, take the name in cell A4 (e.g., “yuor”) and replace it with the value in cell B4 (e.g., “your”).  So I copied that formula all the way down the spreadsheet, in my column E (using column D to show the date when I did this, for future reference).  Then I copied all of those cells from column E into Notepad, made sure that Format > Word Wrap was turned off, and saved that as AC.TXT.  Back in Ubuntu, I opened AC.TXT in gedit.  Testing confirmed that OOo Writer was going to have a hard time with items that gedit displayed in funky format, like these:




Most of the items that caused problems that way were due to the use of smart apostrophes (i.e., single quotes) in Word.  So back in Windows, in Notepad, I opened AC.TXT, found an example of a smart apostrophe, highlighted and copied it into the Find & Replace box, and replaced it with a simple apostrophe.  I made a note in the spreadsheet, next to these items, to indicate that they were not compatible with Writer.  Word's em dash () was also problematic as an import into Writer, so I had to replace it, in this imported list, with two hyphens (--).

With these changes made, back in Ubuntu, I was ready to paste the revised AC.TXT into DocumentList.xml.  I closed Writer, did the paste, started Writer, and tried it out.  It didn’t work.  I looked at the AutoCorr list.  It had imported only a few items.  It looked like it had stopped at an item containing an ampersand (&).  I deleted that item from DocumentList.xml and tried again.  Now its AutoCorr list was longer, but still only a fraction.  Sure enough, it had stopped at another ampersand.  I went back to the spreadsheet and deleted or changed all items containing an ampersand, and marked them on the spreadsheet for incompatibility as well.  Trying again:  still no cigar.  This time, it seems there was an item in my list that was already in quotation marks.  So I was trying to import something like ““This”” and Writer wasn’t buying it.  I fixed that and tried again.  This time for sure.  It worked.  I had the entire list, and I played with it.  It looked like they were all going to work.  I doctored up the list by putting a copy of Writer’s special character for the em dash into a document (Insert > Special Character > Box Drawing) and then copying it into the places in the Tools > AutoCorrect list where I had had to import double hyphens (--) instead.  At some point, I would probably do the same with the smart apostrophes, ampersands, and other items if I decided to use Writer frequently.

So it worked.  I could now use my list of abbreviations in OOo Writer instead of having to use Word.

Monday, May 10, 2010

Tweaking Ubuntu 10.04

I had upgraded from Ubuntu 9.10 to Ubuntu 10.04 (Lucid Lynx).  Now I wanted to make some adjustments.  For this purpose, I would be drawing upon the first and second lists of adjustments I had made when I had installed 9.10.

The first of those other things was to install a PAE-enabled 10.04 kernel, so that I would have access to all of my system's RAM.  I also found that VMware Workstation 7.0 was requiring me to enter my serial number.  I had not entered it after installing it on 9.10; I had just been using the trial serial number.  Now, unfortunately, Workstation was not cooperating:  it was saying "Unknown error entering serial number."  The solution to this problem was to run Workstation as root (i.e., type "sudo vmware" at the Terminal prompt) and enter the serial number there.

Since I was doing an upgrade of a previous installation, I did not have to reinstall packages, but I did have a problem with Software Sources.  I have described that one in a separate post.  (Even if I had needed to reinstall packages, the "installed-software" trick described in the lists of adjustments (above) would have made short work of it.)  On my laptop, I was doing the same upgrade, and there I made some problems for myself when I had to interrupt the upgrade.  Here on the desktop, the next task was (as described in separate posts) to try to get the printing and scanning features of my Brother MFC-7340 printer working from within Ubuntu.  After doing that, I tackled a problem that I had wanted to solve for years:  how to import the list of AutoCorrect entries that I had created in Microsoft Word into OpenOffice.org Writer, running on Ubuntu.  That took some time, but then I was able to get back to the project of working through those notes from previous installations.

The upgrade from Ubuntu 9.10 to 10.04 had preserved much of the configuration I had already set up.  So as I worked through the Ubuntu tweaking steps described in one of my previous posts, I had to deal with only a fraction of the issues addressed there.  One was to prevent icons for mounted drives from appearing on the desktop.  That called for Terminal:  “gconf-editor” > /apps/nautilus/desktop > unclick volumes_visible.  But it was already unclicked, and yet I did have icons for mounted drives visible on the desktop.  I went into Applications > System Tools > Ubuntu Tweak > Desktop Icon Settings and clicked Show desktop icons and left everything else unchecked, but this made no difference.  I tried again, this time using “sudo gconf-editor.”  Ah, yes.  The volumes_visible box was checked for root.  Unchecking it removed the icons from the desktop.

I had not noticed, but somewhere along the line, I had evidently installed nautilus-open-terminal via Synaptic, or possibly it came installed by default.  As its name suggested, this tool added a right-click (context menu) option in Nautilus, "Open in Terminal."  Unlike Windows Explorer, this option was only available for folders in the file listing in Nautilus -- in the right pane, that is, not in the left pane that would typically show the folder tree.  In that left pane, this and other options were absent.

Had another little problem.  During the upgrade to 10.04, the Firefox icon changed, on the left-side (formerly top) panel, to a red do-not-enter or not-allowed kind of icon; and in Applications > Internet, it changed to a grey question-mark box.  I fixed this by going to the panel, right-clicking on Applications > Edit Menus > Internet > Firefox > Properties, clicking on the icon, and selecting /usr/share/pixmaps/firefox.png.  Speaking of Firefox, I wanted Ubuntu to open Firefox and Google Chrome on startup.  I wanted to add these to a script that would run at startup, since I suspected that I would be coming up with other things that I wanted to have happen at startup too.  It seemed pretty technical – beyond my current ability, anyway – but it looked like I might be able to just write a script and put it into /etc./init.d.  I typed “sudo gedit” and then created a file called /etc./init.d/a_startup_script.sh.  I put, into it, the line that I got from e.g., right-clicking on Applications and choosing Edit Menus > Applications > Internet > Firefox > Properties:  “firefox %u.”  I saved it and typed “chmod +x /etc./init.d/a_startup_script.sh.”  Then I rebooted.  This achieved nothing.  So creating a general-purpose startup script remained a goal for the future.

I also went down Gizmo’s Freeware list of tweaks.  I had already done most of the ones I wanted, but there were a few others.  One was to install Windows TrueType fonts in Ubuntu.  I decided to extend their advice somewhat.  I took a look at System > Preferences > Appearance > Fonts.  I could see that a lot of Windows fonts were not present on the list there.  So in Windows XP, I went to C:\Windows\Fonts.  I selected and copied everything to another, temporary folder called UbuFonts.  In UbuFonts, I sorted by file type and deleted the ones that were not TTF files.  Back in Ubuntu, I typed “sudo nautilus” and went to /usr/share/fonts/truetype.  It already had a folder called msttcorefonts, but with only a fraction of the fonts that I had just copied from C:\Windows\Fonts to UbuFonts, and the font files there seemed older and smaller.  I made a backup copy of the msttcorefonts folder and then copied everything from UbuFonts into /usr/share/fonts/truetype/msttcorefonts.  Now System > Preferences > Appearance > Fonts had a much wider selection.  I changed the fonts to Tahoma 10 and the monospace to Courier 10.  Tahoma allowed me to see more information on each line onscreen.

Another tweak from Gizmo called for some playing around with Compiz.  This was a bad idea, as described in a separate post.  Another tweak of interest was to clean up the GRUB boot menu.  I typed “uname -r” and saw that I was using the 2.6.32-22-generic-pae kernel.  In Synaptic, I searched for linux-image, clicked at the top of the left-hand column to sort by those that were installed, and marked for removal all numbered items other than that kernel.  In this case, that included just two items:  linux-image-2.6.31-21-generic-pae and linux-image-2.6.32-22.generic (i.e., not pae).  I did another search for linux-headers and marked all non-2.6.32-22-generic-pae items there too.  In this case, trying to remove linux-headers-2.6.32-22 threatened to remove linux-headers-2.6.32-22-generic-pae as well; but I wanted to keep that, so I didn’t remove linux-headers-2.6.32-22.  On restart, I saw that GRUB now listed just the 2.6.32-22-generic-pae kernel and its recovery mode, along with memtest and Windows XP (it was a dual-boot machine).  I went back into Ubuntu without a problem.  I did later have a VMware problem that might have been related to this, though.

Gizmo also pointed me toward a number of recommended freeware apps.  These were for the KDE (not GNOME) desktop.  I thought it might be time to try KDE, if only to check out these programs.  One was the Wally wallpaper changer, which I installed through Synaptic.  Getting Wally (and the whole KDE desktop) involved a total of 91 files.  Other interesting pieces of Gizmo-recommended software I got through Synaptic:  gtk-recordMyDesktop and Dolphin file manager.  Downloaded directly from creators’ websites, I got WinkFreeFile Sync, and Parted Magic.  I did consider using Dropbox as well, because of its good reviews (by e.g., PC MagazineOnline Backup ToolsLaptop, and alternativeTo; but I decided that Windows Live Sync had important advantages even though I would have to run it in a virtual machine when I was booted into Ubuntu.

(Note:  a few days later -- possibly the first time I tried it after installing KDE -- Google Desktop search was no longer responding to its default Ctrl-Ctrl hotkey.  That is, its Quick Search Box was not coming up.  Something I saw on some webpage, as I was trying to fix that problem, made me wonder whether the KDE installation was to blame.  A tip that fixed it was to open the Google Desktop Search preferences and change the hotkey to Ctrl-F1.)

The last thing to do, in this round of tweaking, was to clean out unnecessary stuff from the drive on which I had installed Ubuntu, so that I could make a backup image in case I needed to reinstall – so that I could just restore the image, that is, instead of having to go back through all these steps.  This, I thought, called for something like the TreeSize utility that I had used in Windows to see where I might have files or folders taking up huge amounts of space.  Among what seemed to be several possibilities, I found an actual Linux version of TreeSize, so I downloaded that – but I also discovered Ubuntu’s Applications > Accessories > Disk Usage Analyzer, whose Treemap Chart was especially interesting.  These revealed that my Ubuntu installation was not presently very large, so I didn’t have to worry too much about shrinking it for this particular image.  It also revealed that by far the largest space hog, within that installation, was the Google Desktop index of stuff on my hard drive, at 5.2GB.  I did see that the Google Chrome cache was also taking 400MB.  I went into Chrome’s Settings (the wrench icon at the upper-right corner) > Options but didn’t see any way to control that, other than to just clear the cache.  I decided to leave it for now, and changed some other settings while I was there.  And that was it.  Ubuntu 10.04 was tweaked, at least for now.

Monday, June 23, 2008

Importing AutoCorrect Entries from Microsoft Word into OpenOffice Writer II

This is a continuation of an earlier post on the same topic. I belatedly discovered that the DAT file that was updated, when I entered a replacement term manually into OpenOffice (OO) Writer, was not at the location I had thought. Its actual location was C:\Documents and Settings\Ray\Application Data\OpenOffice.org2\user\autocorr. But copying the updated DAT file there did not make AutoCorrect work either. At this point, I ran out of time for the investigation. Hopefully I, or someone else, will eventually find a relatively straightforward way to get AutoCorrect entries from Word to OO Writer without manually re-entering them.

Sunday, June 22, 2008

Importing AutoCorrect Entries from Microsoft Word into OpenOffice Writer

Microsoft Word allows users to save shortcuts that will correct or expand what they type. For example, if I type "hte," Word has (I think) a built-in correction to "the." Word knows that "hte" is not a word. I have added a lot of other shortcuts to cut down on the typing: "BO," for example, becomes "Barack Obama" if I type "BO" and then hit the spacebar or use some other punctuation. The challenge, for me, was to import those thousands of built-in and added shortcuts from Word to OpenOffice.org's Writer program. I had posted a question on the matter some time back, but so far it has not yet drawn an answer I have found workable for my purposes. Therefore, I decided to try modifying some advice I had found posted elsewhere. The following is a complete description of the steps I took: 1. I used Method 1 (using AutoCorrect.dot) from http://word.mvps.org/FAQs/Customization/ExportAutocorrect.htm. In Word 2003, I clicked on the button to make a Backup of my Word AutoCorrect entries. That gave me a Word document entitled "AutoCorrect Backup Document." 2. I copied the entire document and pasted it into Microsoft Excel. In Excel, I deleted all rows that did not have actual autocorrection values (e.g., I deleted the column headings). I also deleted all columns other than the actual before-and-after values. (In my case, there was just one such column, called RTF, filled with entries of "FALSE.") I saved this Excel spreadsheet as AC.XLS. 3. Find the OOo language file you're using. For me, using US English, that file was called acor_en-US.dat, and was located (by default) in C:\Program Files\OpenOffice.org 2.4\share\autocorr. I will call this simply the DAT file. 4. Although it claims to be a DAT file, it is actually a zipped file, containing several different files. Use your file zip utility to view the contents of the DAT file. Inside it, you will see a file called DocumentList.xml. You can view the contents of DocumentList.xml using Notepad. (Some of these steps may not be as straightforward for you as they were for me. I'm using 7-Zip for my zipper and OpenWith (a Windows Explorer extension) to open DocumentList.xml using Notepad without having to extract the file first. But whatever. Other tools may work as well or better.) 5. With Notepad's WordWrap feature turned off, here's what I saw at the start of DocumentList.xml: [?xml version="1.0" encoding="UTF-8"?][block-list:block-list list="http://openoffice.org/2001/block-list"][block-list:block name="-->" name="→"][block-list:block name="->" name="->"][block-list:block name="(C)" name="©"][block-list:block name="(R)" name="®"] and it basically just went down the list from there. What I saw at the end of DocumentList.xml was this: [block-list:block name="yuo" name="you"][block-list:block name="yuor" name="your"][/block-list:block-list] Actually, that wasn't exactly what I saw. My blog website here, Blogger.com, is too smart for me. It automatically converts HTML coding into HTML, so I can't show you exact HTML. I have had to modify it for this presentation. The modification I have made has been to replace angle brackets with square brackets. In other words, when you see "[" above, please replace it in your own typing with "<" and when you see "]" above, please replace it with ">". Also, be advised that there are no line breaks in the DocumentList.xml file. It just runs on without interruption from beginning to end. It is not like the nice, organized table that AutoCorrect.dot gives you. So when you are inserting additional AutoCorrect items into DocumentList.xml, you need to just stick them into the flow, not put each one on its own separate line. As the foregoing materials from the start and end of DocumentList.xml show, all I had to do was to insert my own AutoCorrect entries between the beginning and the end. The beginning (before the first AutoCorrect entry) was like this: [?xml version="1.0" encoding="UTF-8"?][block-list:block-list list="http://openoffice.org/2001/block-list"] and the ending was simply [/block-list:block-list] (Remember, again, that you need to type ">" where you see "]" etc. in this presentation.) In between the beginning and the ending, as shown by the examples above (where e.g., "(C)" becomes "©"), the entries each have this format: [block-list:block name="BEFORE" name="AFTER"] So if I wanted to have only one AutoCorrect entry in OOo, replacing "BO" with "Barack Obama," here would be my complete DocumentList.xml file: [?xml version="1.0" encoding="UTF-8"?][block-list:block-list list="http://openoffice.org/2001/block-list"][block-list:block name="BO" name="Barack Obama"][/block-list:block-list] Therefore, going back to my AC.XLS file in Excel, here's what I had to do: 6. Insert a column before the BEFORE column. In other words, the new column A in my spreadsheet would be blank, and column B would contain the characters to be replaced ("BO" in the present example). The purpose of this blank column, and of other blank columns C and E discussed below, is to contain material that we are going to combine together into one grand entry in column F. The steps described below provide a basic Excel technique that you may find useful for a variety of applications in the future. 7. Insert a column between the BEFORE and AFTER column. In other words, column C in my spreadsheet would now be blank, and column D would contain the replacement ("Barack Obama," in the present example). 8. In the blank column A, on the first row of the spreadsheet, type the stuff that appears on each individual replacement line before the BEFORE item. In other words, the first cell, at the top left corner of the AC.XLS spreadsheet, should contain just this: [block-list:block name=" including the quotation mark. (Again, you should have an opening angle bracket "<" rather than an opening square bracket "[" on that line.) 9. In the blank column C, type the stuff that appears between the BEFORE and the AFTER items, including the quotation marks, as follows: " name=" Finally, in the blank column E, type the stuff that appears after the AFTER item, including the quotation mark, as follows: "] replacing the closing square bracket "]" with a closing angle bracket ">". 10. Column F can now concatenate (i.e., combine) the contents of columns A through E. This calls for use of Excel's CONCATENATE function. To enter a function in Excel, just type = and then the name of the function, followed by open parentheses. Then follow the pop-up tips and close the parentheses. In this case, the command that goes into cell F1 is: =CONCATENATE(A1,B1,C1,D1,E1) If you are having problems so far, it may be helpful to mention two Excel factoids. First, you can use the ampersand (&) to concatenate instead of CONCATENATE. Second, you can use CHAR(34) to insert a quotation mark manually. 11. What you have entered into the blank cells in row 1 of AC.XLS needs to be copied all the way down. So do that. Fast way: go to cell A1; hit Ctrl-C; hold down Shift and hit the End key and then the Home key; use arrow keys so that only column A is highlighted; and then hit Enter. Do the same with columns C, E, and F. 12. If all has gone well, you should now have a column F filled with entries in the format shown above: [block-list:block name="BEFORE" name="AFTER"] for each of your Word AutoCorrect entries. These are now in OOo Writer format. Now you've got to get them into Writer. Column F in AC.XLS is dependent on columns A through E. To remove column F from Excel, set it in stone so that its contents do not depend on columns A through E anymore. To do that, select column F (Shift End-DownArrow) and then (in Excel 2003) select Edit > Copy and then Edit > Paste Special > Values > OK > Enter. Changes in columns A through E should now have no effect upon column F. 13. Delete columns A through E. Save AC.XLS as AC.TXT in Text (MS-DOS) format. Kill Excel. Open AC.TXT in Word. You will see that Excel found it helpful to insert extra quotation marks everywhere. Make sure that AutoFormat and AutoFormat As You Type are set not to replace straight quotes with smart quotes. Then, using Ctrl-H (or whatever), replace "" (i.e., double double quotes) with " (i.e., just one double quotation mark) throughout the entire file. 14. Another set of unwanted quotation marks may appear at the start and end of each line. Remember, the desired format is [block-list:block name="BEFORE" name="AFTER"] not "[block-list:block name="BEFORE" name="AFTER"]" (Remember to see "<" when I use "[" as discussed above.) To get rid of those unwanted extra starting and ending quotation marks, take advantage of the fact that ^p is Microsoft Word's way of saying it's time to start a new line. (That's for a carriage return. For a line feed, it's ^l (that's ell, not one).) Do a Ctrl-H to replace "^p" (including quotation marks) with ^p (having no quotation marks). Thus "^p" becomes ^p and "[block-list:block name="BEFORE" name="AFTER"]" becomes [block-list:block name="BEFORE" name="AFTER"] for each item in the list. You may have to clean up the first and last items in the list manually. After this, there were still some lingering beginning and ending quotation marks, so I had to run each part of the foregoing replacement again: "^p becomes ^p and ^p" becomes ^p 15. You may need to do some additional clean-up, now or later. In my case, I saw that (C) was now going to produce a question mark (?) rather than a copyright (©) symbol. Evidently Word and/or Excel didn't use standard ASCII for that symbol. That would be something I would have to fix later, probably by inserting the symbol into some text and then copying and pasting it into the AutoCorrect dialog box. I also saw that smart single quotes had sneaked in: "don't" was now "don?t." I started to fix that with a manual search and replace, putting apostrophes (') in place of question marks (?); but then I saw that fancy French accents had also gotten mangled into question marks too, and would require individual attention, so I just made it Replace All and to hell with it. 16. Now it's time to mash it all together, in good old DocumentList.xml format. Do another global replace (Ctrl-H), this time replacing ^p with nothing. Your nice clean lines will disappear, and you'll have just one tremendously long paragraph full of autocorrect commands. 17. Having done a huge amount of work, it's a good idea to do a very belated backup. While we're at it, let's save it as a different file name. In my case, I saved it as AC1.TXT. Choose US-ASCII (Other encoding), don't insert line breaks, and don't allow character substitution. When I did this, I got a warning that text marked in red would not save correctly in the chosen encoding, but I couldn't find any text in red, else I would have tried to fix it in Word. 18. Open AC1.TXT in Notepad. If WordWrap is off, it should look a lot like DocumentList.xml did. You should be looking at the introductory material, like this: [?xml version="1.0" encoding="UTF-8"?][block-list:block-list xmlns:block-list="http://openoffice.org/2001/block-list"] where, again, I have replaced angle with square brackets so this website will not treat it as HTML. After the introductory material, we have the familiar long list of OOo Writer autocorrect entries. If you're interested in merging those into the set you're bringing over from Word, you might want to copy them from Notepad into Excel back around step 5, above, and then sort them to insure you aren't installing duplicates or contradictions. 19. I wasn't interested in OOo's AutoCorrect entries, so I just deleted everything in DocumentList.xml between that introductory material and the ending line, which I will show here in quotation marks so you can see it with its angle brackets intact: "" Then I pasted the full contents of AC1.TXT into that gap between the starting and ending material in DocumentList.xml. 7-Zip allowed me to save this updated version of DocumentList.xml in the DAT archive; otherwise, I'd have had to save it as a separate file and then zip it into the DAT file as an update. 20. Having done all this work, I made a backup of acor_en-US.dat. I ran OOo Writer. It didn't seem to recognize my definitions. So I saved this post at this point, rebooted, and tried it again.