<commit_before><commit_msg>Update: 2016-06-24T21:14:15.344Z from Word to GitHub Add-in<commit_after>
# InlinePicture object (JavaScript API for Word)

Represents an inline picture.

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.

To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.

Themes and styles also help keep your document coordinated. When you click Design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme.

_Applies to: Word 2016, Word for iPad, Word for Mac_

## Properties

| Property | Type | Description |
| --- | --- | --- |
| altTextDescription | string | Gets or sets a string that represents the alternative text associated with the inline image |
| altTextTitle | string | Gets or sets a string that contains the title for the inline image. |
| hyperlink | string | Gets or sets the hyperlink associated with the inline image. |
| lockAspectRatio | bool | Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. |
| mycustomParam | string | Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. |

## Relationships

| Relationship | Type | Description |
| --- | --- | --- |
| height | **float** | Gets or sets a number that describes the height of the inline image. This is measured in points. |
| parentContentControl | [ContentControl](contentcontrol.md) | Gets the content control that contains the inline image. Returns null if there isn't a parent content control. Read-only. |
| paragraph | [paragraph](paragraph.md) | Gets the paragraph that contains the inline image. Read-only. |
| width | **float** | Gets or sets a number that describes the width of the inline image. This is measured in points. |

## Methods

| Method | Return Type | Description |
| --- | --- | --- |
| [delete()](#delete) | void | Deletes the picture from the document. |
| [getBase64ImageSrc()](#getbase64imagesrc) | object | Gets an objects whose value is the base64 encoded string representation of the inline image. |
| [insertBreak(breakType: BreakType, insertLocation: InsertLocation)](#insertbreakbreaktype-breaktype-insertlo) | void | Inserts a break at the specified location. The insertLocation value can be 'Before' or 'After'. |
| [insertContentControl()](#insertcontentcontrol) | [ContentControl](contentcontrol.md) | Wraps the inline picture with a rich text content control. |
| [insertFileFromBase64(base64File: string, insertLocation: InsertLocation)](#insertfilefrombase64base64file-string-i) | [Range](range.md) | Inserts a document into the body at the specified location. The insertLocation value can be 'Before' or 'After'. |
| [insertHtml(html: string, insertLocation: InsertLocation)](#inserthtmlhtml-string-insertlocation-in) | [Range](range.md) | Inserts HTML at the specified location. The insertLocation value can be 'Before' or 'After'. |
| [insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: InsertLocation)](#insertInlinePictureFromBase64base64Enco) | [InlinePicture](inlinepicture.md) | Inserts a picture into the body at the specified location. The insertLocation value can be 'Replace', 'Before' or 'After'. |
| [insertOoxml(ooxml: string, insertLocation: InsertLocation)](#insertooxmlooxml-string-insertlocation-) | [Range](range.md) | Inserts OOXML at the specified location. The insertLocation value can be 'Before' or 'After'. |
| [insertParagraph(paragraphText: string, insertLocation: InsertLocation)](#insertparagraphparagraphtext-string-ins) | [Paragraph](paragraph.md) | Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. |
| [insertText(text: string, insertLocation: InsertLocation)](#inserttexttext-string-insertlocation-in) | [Range](range.md) | Inserts text into the body at the specified location. The insertLocation value can be 'Before' or 'After'. |
| [select(selectionMode: SelectionMode)](#selectselectionmode-selectionmode) | void | Selects the picture and navigates the Word UI to it. The selectionMode values can be 'Select', 'Start', or 'End'. |
| [load(param: object)](#loadparam-object) | void | Fills the proxy object created in JavaScript layer with property and object values specified in the parameter. |

## Method details

### delete()

Deletes the picture from the document.

#### Syntax

<pre>inlinePictureObject.delete();</pre>

#### Parameters

None

#### Returns

void

### getBase64ImageSrc()

Gets an object whose value is the base64 encoded string representation of the inline image.

#### Syntax

<pre>var base64 = inlinePictureObject.getBase64ImageSrc();

return context.sync().then(function () {   

    console.log("base64 string is "

+ base64.value);

});</pre>

#### Parameters

None

#### Returns

object

### insertBreak(breakType: BreakType, insertLocation: InsertLocation)

#### Syntax

<pre>inlinePictureObject.insertBreak(breakType, insertLocation);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| breakType | BreakType | Required. The break type to add to the body. |
| insertLocation | InsertLocation | Required. The value can be 'Before' or 'After'. |

#### Returns

void

### insertContentControl()

Wraps the inline picture with a rich text content control.

#### Syntax

<pre>inlinePictureObject.insertContentControl();</pre>

#### Parameters

None

#### Returns

[ContentControl](contentcontrol.md)

### insertFileFromBase64(base64File: string, insertLocation: InsertLocation)

Inserts a document into the body at the specified location. The insertLocation value can be 'Before' or 'After'.

#### Syntax

<pre>inlinePictureObject.insertFileFromBase64(base64File, insertLocation);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| base64File | string | Required. The base64 encoded contents of a docx file. |
| insertLocation | InsertLocation | Required. The value can be 'Before' or 'After'. |

#### Returns

[Range](range.md)

### insertHtml(html: string, insertLocation: InsertLocation)

Inserts HTML at the specified location. The insertLocation value can be 'Before' or 'After'.

#### Syntax

<pre>inlinePictureObject.insertHtml(html, insertLocation);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| html | string | Required. The HTML to be inserted in the document. |
| insertLocation | InsertLocation | Required. The value can be 'Before' or 'After'. |

#### Returns

[Range](range.md)

### insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: InsertLocation)

Inserts a picture into the body at the specified location. The insertLocation value can be 'Before' or 'After'.

#### Syntax

inlinePictureObject.insertInlinePictureFromBase64(image, insertLocation);

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| base64EncodedImage | string | Required. The base64 encoded image to be inserted in the body. |
| insertLocation | InsertLocation | Required. The value can be 'Before' or 'After'. |

#### Returns

[InlinePicture](inlinepicture.md)

### insertOoxml(ooxml: string, insertLocation: InsertLocation)

Inserts OOXML at the specified location. The insertLocation value can be 'Before' or 'After'.

#### Syntax

<pre>inlinePictureObject.insertOoxml(ooxml, insertLocation);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| ooxml | string | Required. The OOXML to be inserted. |
| insertLocation | InsertLocation | Required. The value can be 'Before' or 'After'. |

#### Returns

[Range](range.md)

### insertParagraph(paragraphText: string, insertLocation: InsertLocation)

Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'.

#### Syntax

<pre>inlinePictureObject.insertParagraph(paragraphText, insertLocation);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| paragraphText | string | Required. The paragraph text to be inserted. |
| insertLocation | InsertLocation | Required. The value can be 'Before' or 'After'. |

#### Returns

[Paragraph](paragraph.md)

### insertText(text: string, insertLocation: InsertLocation)

Inserts text into the body at the specified location. The insertLocation value can be 'Before' or 'After'.

#### Syntax

<pre>inlinePictureObject.insertText(text, insertLocation);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| text | string | Required. Text to be inserted. |
| insertLocation | InsertLocation | Required. The value can be 'Before' or 'After'. |

#### Returns

[Range](range.md)

### select(selectionMode: SelectionMode)

Selects the picture and navigates the Word UI to it. The selectionMode values can be 'Select', 'Start', or 'End'.

#### Syntax

<pre>inlinePictureObject.select(selectionMode);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| selectionMode | SelectionMode | Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. |

#### Returns

void

### load(param: object)

Fills the proxy object created in JavaScript layer with property and object values specified in the parameter.

#### Syntax

<pre>object.load(param);</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| param | object | Optional. Accepts parameter and relationship names as delimited string or an array. Or, provide [loadOption](loadoption.md) object. |

#### Returns

void

## Support details

Use the [requirement set](../office-add-in-requirement-sets.md) in run time checks to make sure your application is supported by the host version of Word. For more information about Office host application and server requirements, see [Requirements for running Office Add-ins](../../docs/overview/requirements-for-running-office-add-ins.md).

### myAPI()

Gets an object whose value is the base64 encoded string representation of the inline image.

#### Syntax

<pre>var base64 = inlinePictureObject.getBase64ImageSrc();

return context.sync().then(function () {   

    console.log("base64 string is "

+ base64.value);

});</pre>

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| param | object | Optional. Accepts parameter and relationship names as delimited string or an array. Or, provide [loadOption](loadoption.md) object. |
| Myparam | String | Options. Does something… |

#### Returns

object
{'fraction_non_alphanumeric': 0.11661860129776495, 'fraction_numerical': 0.007840663302090843, 'mean_word_length': 4.587613293051359, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 9}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1418598', 'n_tokens_mistral': 3052, 'n_tokens_neox': 2935, 'n_words': 1162}