Menu.InsertItem
---------------

Inserts a menu item into the receiver at a specific location.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Menu.InsertItem"; menu; Item; Index ) 

**MBS**( **"Menu.InsertItem";** /\* Inserts a menu item into the receiver at a specific location. \*/  
**$menu**; /\* The reference to the menu. Please create one with [Menu.CreateMenu](MenuCreateMenu.md). \*/   
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$Index**) /\* An integer index identifying the location of the menu item in the menu.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| menu | The reference to the menu. Please create one with [Menu.CreateMenu](MenuCreateMenu.md). | $menu |
| Item | The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). | $item |
| Index | An integer index identifying the location of the menu item in the menu. | 0 |

### Result

Returns OK or error.

### Description

Inserts a menu item into the receiver at a specific location.  
### See also

- [Menu.CreateMenu](MenuCreateMenu.md)
- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)

### Release notes

- **Version 9.0**
    - Improved out of bounds error message for [Menu.InsertItem](http://www.mbsplugins.eu/MenuInsertItem.shtml), [Menu.RemoveItemAtIndex](http://www.mbsplugins.eu/MenuRemoveItemAtIndex.shtml), [Calendar.Item.GetAttendeeURL](http://www.mbsplugins.eu/CalendarItemGetAttendeeURL.shtml), [Calendar.Item.GetAttendeeCommonName](http://www.mbsplugins.eu/CalendarItemGetAttendeeCommonName.shtml), [Calendar.Item.GetAttendeeStatus](http://www.mbsplugins.eu/CalendarItemGetAttendeeStatus.shtml), [Printer.PrinterName](http://www.mbsplugins.eu/PrinterPrinterName.shtml) and [CLGeocoder.PlacemarkValue](http://www.mbsplugins.eu/CLGeocoderPlacemarkValue.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 8.6pr2](https://www.mbsplugins.de/archive/2018-12-05/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2021, Seite 28](https://filemaker-magazin.de/neuigkeit/4132-Appetithappen-FMM_202102)

This function checks for a license.

Created 18th August 2014 , last changed 31st August 2014

  
[Menu.GetURL](MenuGetURL.md) - [Menu.IsOpen](MenuIsOpen.md)

[HTML Version](MenuInsertItem.shtml)