CommonNetFuncs.Word.OpenXml
4.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CommonNetFuncs.Word.OpenXml --version 4.0.2
NuGet\Install-Package CommonNetFuncs.Word.OpenXml -Version 4.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CommonNetFuncs.Word.OpenXml" Version="4.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommonNetFuncs.Word.OpenXml" Version="4.0.2" />
<PackageReference Include="CommonNetFuncs.Word.OpenXml" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommonNetFuncs.Word.OpenXml --version 4.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CommonNetFuncs.Word.OpenXml, 4.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CommonNetFuncs.Word.OpenXml@4.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommonNetFuncs.Word.OpenXml&version=4.0.2
#tool nuget:?package=CommonNetFuncs.Word.OpenXml&version=4.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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>
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- DocumentFormat.OpenXml (>= 3.3.0)
- NLog.Extensions.Logging (>= 6.1.0)
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 | 96 | 2/8/2026 |
| 4.0.14 | 89 | 2/7/2026 |
| 4.0.12 | 92 | 2/3/2026 |
| 4.0.10 | 91 | 1/24/2026 |
| 4.0.9 | 97 | 1/12/2026 |
| 4.0.8 | 98 | 1/7/2026 |
| 4.0.6 | 97 | 1/2/2026 |
| 4.0.3 | 176 | 12/22/2025 |
| 4.0.2 | 683 | 12/2/2025 |
| 4.0.1 | 193 | 11/27/2025 |
| 4.0.0 | 307 | 11/23/2025 |
| 3.8.38 | 88 | 2/24/2026 |
| 3.8.33 | 103 | 2/2/2026 |
| 3.8.32 | 93 | 2/2/2026 |
| 3.8.30 | 100 | 1/13/2026 |
| 3.8.28 | 109 | 1/5/2026 |
| 3.8.20 | 589 | 12/1/2025 |
| 3.8.18 | 411 | 11/20/2025 |
| 3.8.16 | 415 | 11/17/2025 |
Loading failed