...
Wiki Markup |
---|
{introducedin:4.1.0.1379 |
...
Description |
---|
Excerpt |
---|
Saves the generated Word file to a SharePoint List Item. |
Signature | ||
---|---|---|
C# | C# | }
{description}
{excerpt}Saves the generated Word file to a SharePoint List Item.
{excerpt}
{signature:C#}
public static void Save(this WordTemplate template, Microsoft.SharePoint.ListItem listItem, string fileName)
|
Signature | ||
{signature} {signature:vb.net | vb.net | }
Public Shared Sub Save(ByVal template As WordTemplate, ByVal listItem As Microsoft.SharePoint.ListItem, ByVal fileName As String)
|
Parameters |
---|
...
The current WordTemplate object that is being saved to file
...
SharePoint List Item to which the file is being saved
...
Name of the file to be saved
Exceptions |
---|
Exception | ArgumentNullException | ArgumentNullException | |
---|---|---|---|
| |||
Remarks | |||
You can call Save more than once for a single instance of WordTemplate. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client. Note | {signature} {parameters} {param:template}The current WordTemplate object that is being saved to file {param} {param:listItem}SharePoint List Item to which the file is being saved{param} {param:fileName}Name of the file to be saved{param} {exceptions} {exception:ArgumentNullException}{{Save}} will throw this exception if {{null}} \(C\#\) or {{Nothing}} \(VB.NET\) is passed to the method. {exception} {remarks}You can call [Save|WordTemplate.Save] more than once for a single instance of [WordTemplate]. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client. {note}This is an extension method for the WordTemplate object to be used for saving documents to a SharePoint List Item from within SharePoint. To use this method, you must add a reference to SoftArtisans.OfficeWriter.WordWriter.SharePointIntegration.dll | ||
Example | |||
Code Block | | csharp | csharp |
title | C# | ||
Code Block | vb.net | title |