Edit

Share via


ListObject.Publish(Object, Boolean) Method

Definition

Publishes the ListObject object to a server that is running Microsoft Windows SharePoint Services.

public:
 System::String ^ Publish(System::Object ^ Target, bool LinkSource);
public string Publish (object Target, bool LinkSource);
Public Function Publish (Target As Object, LinkSource As Boolean) As String

Parameters

Target
Object

Required Object. Contains an Array of Strings. The following table describes the elements of this array:Element#Contents0URL of SharePoint server1ListName (Display Name)2Description of the list. Optional.

LinkSource
Boolean

Required Boolean.

Returns

Remarks

This property returns a String which is the URL of the published list on the SharePoint site.

If the ListObject object is not currently linked to a list on a SharePoint site, setting LinkSource to True will create a new list on the specified SharePoint site. If the ListObject object is currently linked to a SharePoint site, setting LinkSource argument to True will replace the existing link (you can only link the list to one SharePoint site). If the ListObject object is not currently linked, setting LinkSource to False will leave the ListObject object unlinked. If the ListObject object is currently linked to a SharePoint site, setting LinkSource to False will keep the ListObject object linked to the current SharePoint site.

Applies to