Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordPictureControl

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
0eef6a5756b9 with working tree changes

Represents a picture content control within a paragraph.

Inheritance

Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public WordContentControlPictureValue? ExtractValue() #

Extracts the current picture content-control image as a form-map value.

public void Remove() #

Removes the picture control from the paragraph.

SetImage 2 overloads
public void SetImage(string filePath, OfficeLength? width = null, OfficeLength? height = null) #

Replaces the picture content-control image with the image at the supplied path.

Parameters

filePath string required
Image file path.
width OfficeIMO.OfficeLength? = null optional
Optional physical width of the image.
height OfficeIMO.OfficeLength? = null optional
Optional physical height of the image.
public void SetImage(Stream imageStream, string fileName, OfficeLength? width = null, OfficeLength? height = null) #

Replaces the picture content-control image with image data from a stream.

Parameters

imageStream System.IO.Stream required
Image stream.
fileName string required
File name used to infer image type.
width OfficeIMO.OfficeLength? = null optional
Optional physical width of the image.
height OfficeIMO.OfficeLength? = null optional
Optional physical height of the image.

Properties

public string? Text { get; } #

Gets the native content text using the same projection as a generic structured document tag; null means no ordinary text run.

public string? Alias { get; } #

Gets the alias associated with this picture control.

public string? Tag { get; set; } #

Gets or sets the tag value for this picture control.

public WordImage? Image { get; } #

Gets the image currently contained by the picture content control.