Table of Contents

Method GetDocumentVariable

Namespace
DocWright.Word.Editing
Assembly
DocWright.Word.dll

GetDocumentVariable(WordDocument, string)

Gets a variable's value by its name (Word matches names ignoring case), or null.

public static string? GetDocumentVariable(this WordDocument document, string name)

Parameters

document WordDocument

The document.

name string

The name.

Returns

string

The value, or null when the document has no such variable.

Exceptions

ArgumentNullException

An argument is null.