SharingService.ShareHTML
------------------------

Shares html with services.

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

MBS( "SharingService.ShareHTML"; ServiceName; HTML; Item... ) 

**MBS**( **"SharingService.ShareHTML";** /\* Shares html with services. \*/  
**$ServiceName**; /\* The service name to use.  
Pass empty text to show menu at mouse cursor and let the user choose.e.g. "" \*/   
**$HTML**; /\* The HTML to parse into styled text to pass on. \*/   
**$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. | "" |
| HTML | The HTML to parse into styled text to pass on. |  |
| 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 html with services.  
You can let the user pick the service or pass it as service name.  
Pass as many parameters as needed to include 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 |

  
Same as [SharingService.ShareItems](SharingServiceShareItems.md), but first item to share is parsed as html and other items can be e.g. attachments as container values.  
  
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.  
### See also

- [SharingService.ShareItems](SharingServiceShareItems.md)
- [SharingService.ShareValues](SharingServiceShareValues.md)

### Release notes

- **Version 15.4**
    - Added [SharingService.ShareHTML](https://www.mbsplugins.eu/SharingServiceShareHTML.shtml) function to share HTML text to a service.

### Blog Entries

- [MBS FileMaker Plugin 15.4 News](https://www.mbsplugins.de/archive/2025-09-23/MBS_FileMaker_Plugin_154_News/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.4pr1](https://www.mbsplugins.de/archive/2025-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 29th July 2025 , last changed 29th July 2025

  
[SharingService.SetTrigger](SharingServiceSetTrigger.md) - [SharingService.ShareItems](SharingServiceShareItems.md)

[HTML Version](SharingServiceShareHTML.shtml)