## FileFormatUtil.SaveFormatToLoadFormat method

Converts a [`SaveFormat`](../../saveformat/) value to a [`LoadFormat`](../../loadformat/) value if possible.

```csharp
public static LoadFormat SaveFormatToLoadFormat(SaveFormat saveFormat)
```

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentException | Throws when cannot convert. |

## Examples

Shows how to convert a save format to its corresponding load format.

```csharp
Assert.That(FileFormatUtil.SaveFormatToLoadFormat(SaveFormat.Html), Is.EqualTo(LoadFormat.Html));

// Some file types can have documents saved to, but not loaded from using Aspose.Words.
// If we attempt to convert a save format of such a type to a load format, an exception will be thrown.
Assert.Throws<ArgumentException>(() => FileFormatUtil.SaveFormatToLoadFormat(SaveFormat.Jpeg));
```

### See Also

* enum [LoadFormat](../../loadformat/)
* enum [SaveFormat](../../saveformat/)
* class [FileFormatUtil](../)
* namespace [Aspose.Words](../../../aspose.words/)
* assembly [Aspose.Words](../../../)
