# OpenOfficeDictionary Constructor

> Initializes a new instance of the OpenOfficeDictionary class.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Constructor
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TXSpell.Core.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.dll` from the setup
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.Proofing > OpenOfficeDictionary Constructor
- **875 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/constructor/llms-full.txt

---

### Description

Initializes a new instance of the [OpenOfficeDictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/llms-full.txt) class.

### Syntax

#### OpenOfficeDictionary(string)

Initializes a new instance of the [OpenOfficeDictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/llms-full.txt) class by loading a Hunspell Open Source dictionary from a file.

```csharp
public OpenOfficeDictionary(string dictionaryPath);
```

```vbnet
Public Sub New(dictionaryPath As String)
```

| Parameter | Description |
|---|---|
| dictionaryPath | Specifies the path for the Hunspell Open Source dictionary dict file. By specifying only the dictionary name without any file path, the corresponding dictionary file of the default dictionary folder is used. The name of the specified Hunspell Open Source dictionary file must end with ".dic" or ".aff". If the file does not exist, an ArgumentException is thrown. |

#### OpenOfficeDictionary(string\[\], string\[\], CultureInfo)

Initializes a new instance of the [OpenOfficeDictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/llms-full.txt) class by loading a dictionary from string arrays that represent the content of a Hunspell Open Source dictionary and the corresponding affix file.

```csharp
public OpenOfficeDictionary(string[] dictionaryLines, string[] affixLines, CultureInfo language);
```

```vbnet
Public Sub New(dictionaryLines As String(), affixLines As String(), language As CultureInfo)
```

| Parameter | Description |
|---|---|
| dictionaryLines | The string array that represents the content of a Hunspell Open Source dictionary file. Each string of this array is considered as a line of the dictionary file. |
| affixLines | The string array that represents the content of a Hunspell Open Source affix file. Each string of this array is considered as a line of the affix file. |
| language | Specifies the language of the dictionary. |

### Examples

The following example creates an Open Office Dictionary instance and configures its display name setting for a document workflow.

```csharp
TXTextControl.Proofing.OpenOfficeDictionary openOfficeDictionary = new("document.docx");
openOfficeDictionary.DisplayName = "CustomerName";
```

```vbnet
Dim openOfficeDictionary As New TXTextControl.Proofing.OpenOfficeDictionary("document.docx")
openOfficeDictionary.DisplayName = "CustomerName"
```

---

## Nearby

- **Previous:** [OpenOfficeDictionary Class](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/llms-full.txt)
- **Next:** [SpelledWord Class](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spelledword/llms-full.txt)
