_NameSpace.CreateSharingItem(Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new SharingItem object.
public Microsoft.Office.Interop.Outlook.SharingItem CreateSharingItem (object Context, object Provider);
Public Function CreateSharingItem (Context As Object, Optional Provider As Object) As SharingItem
Parameters
- Context
- Object
Either a String (string in C#) value or a Folder object representing the sharing context to be used.
- Provider
- Object
An OlSharingProvider value representing the sharing provider to be used.
Returns
A SharingItem object that represents a sharing message for the specified context.
Remarks
If a String (string in C#) value is specified in Context
, the method assumes that a URL has been provided as a sharing context. If a Folder object is specified in Context
, the method attempts to discover the sharing context from the folder. If no sharing context exists, or if more than one sharing context exists, an error occurs.
If Provider
is not specified, the method attempts to use the appropriate sharing provider for the value specified in Context
.