# LoadSaveSettingsBase.DocumentBasePath Property

> Sets a base path saved in the document that is used to resolve relative file paths.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > LoadSaveSettingsBase.DocumentBasePath Property
- **603 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/loadsavesettingsbase/documentbasepath-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/loadsavesettingsbase/documentbasepath-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/loadsavesettingsbase/documentbasepath-property/llms-full.txt

---

### Description

Sets a base path saved in the document that is used to resolve relative file paths.

### Syntax

```csharp
public string DocumentBasePath { get; set; }
```

```vbnet
Public Property DocumentBasePath As String
```

### Examples

The following example resolves relative document resources against an application-owned assets directory. The configured base settings are then used by the appropriate load or save operation.

```csharp
loadSaveSettingsBase.DocumentBasePath = Path.GetFullPath("DocumentAssets");
if (loadSaveSettingsBase is LoadSettings loadSettings)
{
    textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings);
}
else if (loadSaveSettingsBase is SaveSettings saveSettings)
{
    textControl.Save("configured-document.docx", StreamType.WordprocessingML, saveSettings);
}
```

```vbnet
loadSaveSettingsBase.DocumentBasePath = Path.GetFullPath("DocumentAssets")
If TypeOf loadSaveSettingsBase Is LoadSettings Then
    textControl.Load("template.docx", StreamType.WordprocessingML, DirectCast(loadSaveSettingsBase, LoadSettings))
ElseIf TypeOf loadSaveSettingsBase Is SaveSettings Then
    textControl.Save("configured-document.docx", StreamType.WordprocessingML, DirectCast(loadSaveSettingsBase, SaveSettings))
End If
```

---

## Nearby

- **Previous:** [LoadSaveSettingsBase.DefaultStreamType Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/loadsavesettingsbase/defaultstreamtype-property/llms-full.txt)
- **Next:** [LoadSaveSettingsBase.EmbeddedFiles Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/loadsavesettingsbase/embeddedfiles-property/llms-full.txt)
