Table of Contents

Method SetImageDecorative

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

SetImageDecorative(WordDocument, ImageRef, bool)

Marks a picture decorative, or not, as Word's Alt Text pane does (Phase 176, WQ-0157): a decorative picture is one a screen reader skips, so marking it removes its alternative text.

public static DocumentEdit SetImageDecorative(this WordDocument document, ImageRef image, bool decorative)

Parameters

document WordDocument

The document that holds the picture.

image ImageRef

The picture.

decorative bool

Whether it is decorative.

Returns

DocumentEdit

The edit; Before is just before the picture and After just past it. The state the picture already has gives an empty edit.

Exceptions

ArgumentNullException

document or image is null.

ArgumentException

The picture is not in document, or not in a paragraph.

InvalidOperationException

The picture's drawing is not one DrawingML picture, or it is in a shape's text box.