Documentation/OOoAuthors User Manual/Migration Guide 2006/Importing Files

From Apache OpenOffice Wiki
Jump to: navigation, search


Importing other Microsoft Office Files

Introduction

This chapter describes how to import custom dictionaries and AutoText entries from Microsoft Office to OpenOffice.org. The author knows no easy way of importing Microsoft Office AutoCorrect entries into OpenOffice.org.

Custom dictionaries

Dictionaries are used when checking any document for spelling errors. Custom dictionaries are enhanced dictionaries that contain words applicable to particular industries or pursuits, unique words, or custom spellings.

OpenOffice.org does not provide a way to import Microsoft Office’s custom dictionaries. However, a macro has been developed to import Office’s custom dictionaries into OpenOffice.org. A link to download the file is at http://ooomacros.org/user.php#114694.

To import Microsoft Office’s custom dictionaries, follow the steps below. (Details are given in the following sections.)

  1. Create a new dictionary in OpenOffice.org (optional).
  2. Download the file that contains the macro.
  3. In Microsoft Word, locate where the custom dictionaries are stored.
  4. Import the dictionary into OpenOffice.org.

Create a new dictionary in OpenOffice.org

This step is optional. You can add the words to an existing custom dictionary in OOo.

  1. Tools > Options > Language Settings > Writing Aids > New.
  2. New Dictionary dialog: Give the dictionary a name.
    Figure 1: Creating a new dictionary in OpenOffice.org
  3. Choose a language for the dictionary if you want to limit it to that language, or leave it at [All].
  4. Click OK to save your choice and return to the Writing Aids page.
  5. Click OK to close the Options dialog.

Download the file that contains the macro

  1. In a web browser start at http://ooomacros.org/user.php#114694 and click on the link for Download Dictionary Import/Export .
  2. This should display a SourceForge page. Click on the latest link for this file.
  3. Choose a mirror close to you to increase the file transfer speed.
  4. The browser should display a Save File dialog. Fill in the dialog. Remember where you save the file.
  5. Unzip the file that you saved in the previous step. You should now have a file named ImportExportDictionary1-1.sxw (or a similar name).

In Microsoft Word, locate where the custom dictionaries are stored

In Word, choose Tools > Options > Spelling & Grammar > Custom Dictionaries button. Look for the name of the custom dictionary you want to transfer. The default name is CUSTOM.DIC.

The typical location is: C:\Windows\Application Data\Microsoft\Proof\CUSTOM.DIC but in shared systems it may be C:\Documents and Settings\Username\Application Data\Microsoft\Proof\CUSTOM.DIC. A partial path is shown at the bottom of the Custom Dictionaries dialog in Word.

You can use Windows Explorer to find the file. For CUSTOM.DIC you may need to include hidden and system files in your search in later versions of Windows.

Import the dictionary into OpenOffice.org

  1. Open the file in OpenOffice.org that contains the import/export macro downloaded in step 2 above.
  2. A confirmation dialog about running macros may be displayed. If it is, click Enable Macros.
  3. Click the Run Macro button (towards the top of the document).
  4. On the Import & Export Dictionary dialog, in the Text file field, either type in the location of the custom dictionary to be imported or click on the ... button, navigate to the custom dictionary, select it and click Open.
  5. Choose from the dropdown list the OOo dictionary to which you want to add the words; this may be the one that you created earlier.
    Figure 2: Choosing an OOo dictionary for words imported from Microsoft Word
  6. Click Import. Two dialogs will be displayed, one after the other. The first dialog says how many words are in the OOo dictionary to which you are adding the words (if you have just created the OOo dictionary, this number is probably 0) and the second how many words the OOo dictionary holds after the import. Click OK to close each of these dialogs.
  7. Click Close in the Import & Export Dictionary dialog.
  8. Close the Import/Export Text File document and the job is done.

To check that the OOo custom dictionary contains the words from the Word custom dictionary, go to Tools > Options > Language Settings > Writing Aids, select the dictionary to which you added the words, and click Edit. The list of words is displayed in the Edit Custom Dictionary dialog.

AutoText entries

AutoText is a feature that stores formatted text or text with graphics, tables and fields and provides the means to easily insert the saved material into documents.

OpenOffice.org stores AutoText entries in XML files in specified folders. Microsoft Word stores AutoText entries in template files, mainly in Normal.dot. To import the AutoText entries from the Word templates follow these steps:

  1. Locate the Word template from which you want to import AutoText. Typically templates are found in:C:\Windows\Application Data\Microsoft\Templates or C:\Documents and Settings\Usersname\Application Data\Microsoft\Templates.
  2. In OOo, select Edit > AutoText (or press Control+F3).
  3. You can create a new category or use one of the standard categories.

To create a new category:

  1. On the AutoText dialog, click the Categories button.
    Figure 3: Creating a new AutoText category
  2. On the Edit Categories dialog, type a name for the new category, choose the path to where you want it saved, and click New. The new category now appears in the Selection list in the middle of the dialog.
  3. Click OK. to close the Edit Categories dialog and return to the AutoText dialog.

To import the AutoText:

  1. On the AutoText dialog, select the category into which you will import the AutoText entries. Click AutoText > Import.
  2. In the Open dialog, navigate to and select the desired Word template and click Open. The AutoText entries should now be visible in the left list box of the AutoText dialog.
  3. Click Close.

AutoCorrect entries

AutoCorrect is a feature to automatically correct words as you type. You can add entries to the AutoCorrect function to customize the way that OpenOffice.org operates.

The author has not been able to find a way of importing Microsoft Office AutoCorrect entries into OpenOffice.org. A thread discussing this problem can be viewed at: http://www.oooforum.org/forum/viewtopic.php?t=10248.

Information from that thread is copied below, because it is reportedly possible for you to import the “first hundred or so” entries using this information.

There is a Word macro available from http://word.mvps.org/FAQs/Customization/ExportAutocorrect.htm for creating a Word document with the AutoCorrrect entries.

OOo AutoCorrect files are typically stored in ./user/autocorr/acorrXXXX.dat (where XXXX corresponds to the number for a given locale).

Template:Documentation/Tip These files are zipped and contain the file DocumentList.xml (if no AutoCorrect entries have been created the file will be empty) which looks like:

<block-list:block-list>
  <block-list:block block-list:abbreviated-name="(C)" block-list:name="©"/>
  <block-list:block block-list:abbreviated-name="yuor" block-list:name="your"/>
</block-list:block-list>

So it would not be too difficult to create a text file to look like this and to zip it into a acorrXXXX.dat file.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools