...
Wiki Markup |
---|
{introducedin:4.5 |
...
Description |
---|
Excerpt |
---|
Writes a Document to a file and saves it to a SharePoint List Item. |
Signature | ||
---|---|---|
C# | C# | }
{description}
{excerpt}Writes a [Document|Document] to a file and saves it to a SharePoint List Item.{excerpt}
{signature:C#}
public static void Save(this WordApplication wordApplication, Document document, Microsoft.SharePoint.SPListItem listItem, string fileName)
|
Signature | ||
{signature}{signature:vb.net | vb.net | }
Public Shared Sub Save(ByVal wordApplication As WordApplication, ByVal document As Document, ByVal docLib As Microsoft.SharePoint.SPListItem, ByVal fileName As String)
|
Parameters |
---|
...
The current WordApplication object from which Save is being called
...
The Document
to save.
...
The SharePoint List Item to which the file will be saved
...
Filename of the Document
Exceptions |
---|
Exception | System.Exception | System.Exception | |
---|---|---|---|
Thrown if there is an error saving the file. | |||
Remarks | |||
The WordApplication.Preserve property is used to specify the way WordWriter will save the document. When the Note | {signature} {parameters} {param:wordApplication}The current WordApplication object from which Save is being called{param} {param:document}The {{Document}} to save.{param} {param:listItem}The SharePoint List Item to which the file will be saved{param} {param:fileName}Filename of the {{Document}}{param} {exceptions} {exception:System.Exception}Thrown if there is an error saving the file.{exception} {remarks}The [WordApplication.Preserve|WordApplication.Preserve] property is used to specify the way WordWriter will save the document. When the {{preserve}} property is set to true, WordWriter attempts to preserve all formatting and features that it doesn't directly support. This includes Fields, Footnotes, Hyperlinks, Comments, and Anchored Images. When the {{preserve}} property is false, only those features directly supported by WordWriter will be preserved. This includes all Tables, Lists, Headers and Footers. {note}This is an extension method for the WordApplication 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 |