Table of Contents

Method ResolveStyleFormatting

Namespace
DocWright.Layout
Assembly
DocWright.Layout.dll

ResolveStyleFormatting(WordDocument, string, ResolveOptions?)

Resolves what a style gives: the paragraph and run properties of an empty paragraph in a paragraph style, or of a run in a character style inside a paragraph of the default paragraph style, through the style's chain and the document defaults, with no direct formatting. This is what Word's Modify Style dialog shows.

public static StyleFormatting ResolveStyleFormatting(WordDocument document, string styleId, ResolveOptions? options = null)

Parameters

document WordDocument

The document.

styleId string

A paragraph or character style's id.

options ResolveOptions

The options; null for the defaults.

Returns

StyleFormatting

The style's formatting.

Exceptions

ArgumentNullException

document or styleId is null.

ArgumentException

No paragraph or character style has the id.