CommonNetFuncs.Word.OpenXml 3.5.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package CommonNetFuncs.Word.OpenXml --version 3.5.3
                    
NuGet\Install-Package CommonNetFuncs.Word.OpenXml -Version 3.5.3
                    
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="3.5.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommonNetFuncs.Word.OpenXml" Version="3.5.3" />
                    
Directory.Packages.props
<PackageReference Include="CommonNetFuncs.Word.OpenXml" />
                    
Project file
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 3.5.3
                    
#r "nuget: CommonNetFuncs.Word.OpenXml, 3.5.3"
                    
#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@3.5.3
                    
#: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=3.5.3
                    
Install as a Cake Addin
#tool nuget:?package=CommonNetFuncs.Word.OpenXml&version=3.5.3
                    
Install as a Cake Tool

CommonNetFuncs.Word.OpenXml

nuget

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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

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
3.6.6 16 7/21/2025
3.6.1 127 7/14/2025
3.6.0 142 7/14/2025
3.5.3 132 7/10/2025
3.5.0 143 7/7/2025
3.4.23 151 6/26/2025
3.4.21 136 6/26/2025
3.4.20 130 6/25/2025
3.4.18 137 6/23/2025
3.4.8 283 6/11/2025
3.4.2 146 6/2/2025
3.4.1 86 5/30/2025
3.4.0 94 5/30/2025
3.3.11 150 5/18/2025
3.3.10 232 5/13/2025
3.3.0 164 4/29/2025
3.2.20 238 3/7/2025
3.2.13 130 2/13/2025
3.2.9 111 2/4/2025
3.2.0 115 12/19/2024
3.1.0 184 12/6/2024
3.0.0 118 12/3/2024
2.1.3 112 12/3/2024
2.1.0 112 12/2/2024
2.0.5 113 11/26/2024
2.0.3 116 11/20/2024
2.0.2 109 11/18/2024
2.0.1 114 11/15/2024
2.0.0 108 11/14/2024
1.0.47 114 11/14/2024
1.0.42 121 11/12/2024
1.0.40 113 11/12/2024
1.0.37 120 11/6/2024
1.0.31 117 11/1/2024