CommonNetFuncs.Word.OpenXml
4.0.37
See the version list below for details.
dotnet add package CommonNetFuncs.Word.OpenXml --version 4.0.37
NuGet\Install-Package CommonNetFuncs.Word.OpenXml -Version 4.0.37
<PackageReference Include="CommonNetFuncs.Word.OpenXml" Version="4.0.37" />
<PackageVersion Include="CommonNetFuncs.Word.OpenXml" Version="4.0.37" />
<PackageReference Include="CommonNetFuncs.Word.OpenXml" />
paket add CommonNetFuncs.Word.OpenXml --version 4.0.37
#r "nuget: CommonNetFuncs.Word.OpenXml, 4.0.37"
#:package CommonNetFuncs.Word.OpenXml@4.0.37
#addin nuget:?package=CommonNetFuncs.Word.OpenXml&version=4.0.37
#tool nuget:?package=CommonNetFuncs.Word.OpenXml&version=4.0.37
CommonNetFuncs.Word.OpenXml
This lightweight project contains helper methods related to MS Word formatted documents (.doc & .docx).
Contents
ChangeUrls
Helpers that search for and change URLs in .doc and .docx files.
Common Usage Examples
<details> <summary><h3>Usage Examples</h3></summary>
ChangeUrlsInWordDoc
Look for specific URLs in a word document and change them to a different URL.
FileStream stream = new(@"C:\Documents\UrlTest.docx");
bool success = ChangeUrls.ChangeUrlsInWordDoc(stream, "http://google.com", "http://yahoo.com", true); // Replaces all "yahoo.com" URLs in the document with "google.com"
// Alternatively, use a dictionary for replacements
Dictionary<string, string> urlsToUpdate = new()
{
{ "http://google.com", "http://yahoo.com" },
{ "http://facebook.com", "http://meta.com" },
{ "http://tumblr.com", "http://imgr.com" }
};
bool success = ChangeUrls.ChangeUrlsInWordDoc(stream, urlsToUpdate); // Replaces all key URLs in the dictionary with their associated value
ChangeUrlsInWordDocRegex
Look for URLs that match a regex pattern in a word document and replace the matched string with a new one.
FileStream stream = new(@"C:\Documents\UrlTest.docx");
bool success = ChangeUrls.ChangeUrlsInWordDoc(stream, @"^(http:\/\/)", "https://", true); // Replaces "http://" with "https://" in all URLs in the document
// Alternatively, use a dictionary for replacements
Dictionary<string, string> urlsToUpdate = new()
{
{ @"^(http:\/\/)", "https://" },
{ @"(yahoo\.com)", "google.com" }
};
bool success = ChangeUrls.ChangeUrlsInWordDoc(stream, urlsToUpdate); // Replaces all regex matches with the keys in the dictionary with their associated values
</details>
Installation
Install via NuGet:
dotnet add package CommonNetFuncs.Word.OpenXml
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- DocumentFormat.OpenXml (>= 3.5.1)
- NLog.Extensions.Logging (>= 6.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.3.6 | 40 | 9/18/2026 |
| 4.3.5 | 46 | 9/15/2026 |
| 4.3.4 | 106 | 8/27/2026 |
| 4.3.3 | 105 | 8/24/2026 |
| 4.3.2 | 114 | 8/14/2026 |
| 4.3.1 | 107 | 8/11/2026 |
| 4.3.0 | 107 | 8/3/2026 |
| 4.1.14 | 114 | 7/31/2026 |
| 4.1.13 | 118 | 7/31/2026 |
| 4.1.12 | 111 | 7/31/2026 |
| 4.1.11 | 130 | 7/9/2026 |
| 4.1.0 | 126 | 6/5/2026 |
| 4.0.53 | 126 | 5/28/2026 |
| 4.0.43 | 122 | 5/14/2026 |
| 4.0.40 | 130 | 5/10/2026 |
| 4.0.39 | 127 | 5/10/2026 |
| 4.0.37 | 127 | 5/9/2026 |
| 4.0.36 | 110 | 5/8/2026 |
| 4.0.31 | 129 | 4/21/2026 |