SharingService.ShareItems
-------------------------

Shares items with services.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SharingService](component_SharingService.md) | [10.3](newinversion103.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "SharingService.ShareItems"; ServiceName; Item... ) 

**MBS**( **"SharingService.ShareItems";** /\* Shares items with services. \*/  
**$ServiceName**; /\* The service name to use.  
Pass empty text to show menu at mouse cursor and let the user choose.e.g. "" \*/   
**$Item...**) /\* Pass one parameter for each item.  
An item may be a container with an image, a list of URLs, a list of native file paths or styled text.e.g. "Hello World" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ServiceName | The service name to use.   Pass empty text to show menu at mouse cursor and let the user choose. | "" |
| Item... | Pass one parameter for each item.   An item may be a container with an image, a list of URLs, a list of native file paths or styled text. | "Hello World" |

### Result

Returns OK or error.

### Description

Shares items with services.  
You can let the user pick the service or pass it as service name.  
Pass as many parameters as needed to include all URLs, native file paths, styled text or container values with images to the function as needed.  
  
Below a few sample service names, but there may be more installed on your computer.  
  
| Name | Title |
|---|---|
| com.apple.messages.ShareExtension | Messages |
| com.apple.Notes.SharingExtension | Notes |
| com.apple.reminders.sharingextension | Reminders |
| com.apple.share.AirDrop.send | AirDrop |
| com.apple.share.Mail.compose | Mail |
| com.apple.share.System.add-to-iphoto | Add to Photos |

  
The Mail service can launch Outlook if that is the preferred mail client.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat Item parameter as often as you need.  
### Examples

Share items:

 # for the case you use email, we may predefine the subject &amp; recipients we suggest   
Set Variable \[ $r ; Value: MBS ("[SharingService.SetEmailSubject](SharingServiceSetEmailSubject.md)"; Sharing Services::Email Subject) \]   
Set Variable \[ $r ; Value: MBS ("[SharingService.SetEmailRecipients](SharingServiceSetEmailRecipients.md)"; Sharing Services::Email Recipients) \]   
\#   
\# set trigger   
Set Variable \[ $r ; Value: MBS ("[SharingService.SetTrigger](SharingServiceSetTrigger.md)"; Get(FileName); "Trigger") \]   
\#   
\# share them   
Set Variable \[ $r ; Value: MBS ("SharingService.ShareItems"; Sharing Services::ServiceName ;   
// pass as many parameter with items. Empty ones will be ignore.   
Sharing Services::URLs ;   
Sharing Services::Text ;   
Sharing Services::Image ;   
Sharing Services::File Paths) \]   
Set Field \[ Sharing Services::Result ; $r \]  
Send text to Apple Mail:

 MBS ( "SharingService.ShareItems"; "com.apple.share.Mail.compose"; "Hello World" )  
Send two URLs and some text:

 MBS ( "SharingService.ShareItems"; ""; "https://www.monkeybreadsoftware.com/filemaker/¶https://www.mbsplugins.eu/"; "Check the websites" )  
### See also

- [SharingService.SetEmailRecipients](SharingServiceSetEmailRecipients.md)
- [SharingService.SetEmailSubject](SharingServiceSetEmailSubject.md)
- [SharingService.SetTrigger](SharingServiceSetTrigger.md)
- [SharingService.ShareHTML](SharingServiceShareHTML.md)
- [SharingService.ShareValues](SharingServiceShareValues.md)

### Release notes

- **Version 15.3**
    - Improved [SharingService.ShareItems](https://www.mbsplugins.eu/SharingServiceShareItems.shtml) to better work with sharing styled text.

### Example Databases

- [Mac only/Sharing Services](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Sharing%20Services.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin 15.3 News](https://www.mbsplugins.de/archive/2025-07-29/MBS_FileMaker_Plugin_153_News/monkeybreadsoftware_blog_filemaker)
- [Create an email in Apple Mail from FileMaker](https://www.mbsplugins.de/archive/2025-06-02/Create_an_email_in_Apple_Mail_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.3pr1](https://www.mbsplugins.de/archive/2025-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Advent calendar - Door 13 - Share Files With Apple Dialog](https://www.mbsplugins.de/archive/2024-12-13/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [What is new in the MBS FileMaker Plugin Version 10.3](https://www.mbsplugins.de/archive/2020-07-31/What_is_new_in_the_MBS_FileMak/monkeybreadsoftware_blog_filemaker)
- [Using Sharing Services in MacOS with FileMaker](https://www.mbsplugins.de/archive/2020-06-29/Using_Sharing_Services_in_MacO/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th June 2020 , last changed 29th July 2025

  
[SharingService.ShareHTML](SharingServiceShareHTML.md) - [SharingService.ShareValues](SharingServiceShareValues.md)

[HTML Version](SharingServiceShareItems.shtml)