WordFile.GetMediaFile
---------------------

Queries media file in word file.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WordFile](component_WordFile.md) | [6.3](newinversion63.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "WordFile.GetMediaFile"; WordFile; Name ) 

**MBS**( **"WordFile.GetMediaFile";** /\* Queries media file in word file. \*/  
**$WordFile**; /\* The reference number of the open word file. \*/   
**$Name**) /\* The name of the item to query.e.g. "image1.jpeg" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WordFile | The reference number of the open word file. | $wordFile |
| Name | The name of the item to query. | "image1.jpeg" |

### Result

Returns container value or error.

### Description

Queries media file in word file.  
Returns the images, so you can put them into a container.  
### Examples

Extract image from word file:

 Set Variable \[$w ; Value:MBS ( "[WordFile.OpenContainer](WordFileOpenContainer.md)"; WordTest::wordfile )\]  
Set Variable \[$r ; Value:MBS ( "WordFile.GetMediaFile"; $w ; "image1.jpeg")\]  
Set Field \[WordTest::image ; $r \]  
Set Variable \[$r ; Value:MBS ( "[WordFile.Release](WordFileRelease.md)"; $w )\]  
### See also

- [WordFile.MediaFiles](WordFileMediaFiles.md)
- [WordFile.OpenContainer](WordFileOpenContainer.md)
- [WordFile.Release](WordFileRelease.md)
- [WordFile.SetMediaFile](WordFileSetMediaFile.md)

### Blog Entries

- [MBS FileMaker Plugin, version 6.3pr6](https://www.mbsplugins.de/archive/2016-07-09/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2021, Seite 20](https://filemaker-magazin.de/neuigkeit/4165-Appetithappen-FMM_202106)

This function checks for a license.

Created 6th July 2016 , last changed 6th July 2016

  
[WordFile.GetFieldText](WordFileGetFieldText.md) - [WordFile.GetProperty](WordFileGetProperty.md)

[HTML Version](WordFileGetMediaFile.shtml)