CommonNetFuncs.Word.OpenXml
4.0.15
See the version list below for details.
dotnet add package CommonNetFuncs.Word.OpenXml --version 4.0.15
NuGet\Install-Package CommonNetFuncs.Word.OpenXml -Version 4.0.15
<PackageReference Include="CommonNetFuncs.Word.OpenXml" Version="4.0.15" />
<PackageVersion Include="CommonNetFuncs.Word.OpenXml" Version="4.0.15" />
<PackageReference Include="CommonNetFuncs.Word.OpenXml" />
paket add CommonNetFuncs.Word.OpenXml --version 4.0.15
#r "nuget: CommonNetFuncs.Word.OpenXml, 4.0.15"
#:package CommonNetFuncs.Word.OpenXml@4.0.15
#addin nuget:?package=CommonNetFuncs.Word.OpenXml&version=4.0.15
#tool nuget:?package=CommonNetFuncs.Word.OpenXml&version=4.0.15
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.4.1)
- NLog.Extensions.Logging (>= 6.1.1)
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.0.17 | 85 | 2/23/2026 |
| 4.0.15 | 97 | 2/8/2026 |
| 4.0.14 | 89 | 2/7/2026 |
| 4.0.12 | 93 | 2/3/2026 |
| 4.0.10 | 91 | 1/24/2026 |
| 4.0.9 | 98 | 1/12/2026 |
| 4.0.8 | 98 | 1/7/2026 |
| 4.0.6 | 98 | 1/2/2026 |
| 4.0.3 | 176 | 12/22/2025 |
| 4.0.2 | 684 | 12/2/2025 |
| 4.0.1 | 194 | 11/27/2025 |
| 4.0.0 | 328 | 11/23/2025 |
| 3.8.38 | 89 | 2/24/2026 |
| 3.8.33 | 104 | 2/2/2026 |
| 3.8.32 | 93 | 2/2/2026 |
| 3.8.30 | 100 | 1/13/2026 |
| 3.8.28 | 110 | 1/5/2026 |
| 3.8.20 | 590 | 12/1/2025 |
| 3.8.18 | 412 | 11/20/2025 |
| 3.8.16 | 417 | 11/17/2025 |