...
Wiki Markup |
---|
{introducedin:4.1.0.1379 |
...
Description |
---|
Excerpt |
---|
Opens and returns an existing Document from a SharePoint Document Library. |
Signature | ||
---|---|---|
C# | C# | }
{description}
{excerpt}Opens and returns an existing [Document|Document] from a SharePoint Document Library.{excerpt}
{signature:C#}
public Document Open(this WordApplication wordApplication, Microsoft.SharePoint.SPDocumentLibrary docLib, String fileName)
|
Signature | ||
{signature}{signature:vb.net | vb.net | }
Public Function Open(ByVal wordApplication As WordApplication, ByVal docLib As Microsoft.SharePoint.SPDocumentLibrary, ByVal fileName As String) As Document
|
Parameters |
---|
...
The current WordApplication object which is calling Open
...
SharePoint Document Library from which the file is being opened
...
Filename of the document to open from the Document Library
Returns |
---|
The document that is opened from the Document Library. |
Exceptions |
---|
Exception | System.Exception | System.Exception | |
---|---|---|---|
Thrown if an error occurs while opening the document. | |||
Remarks | |||
Though the WordTemplate object currently supports Office Open XML (Word 2007) format files, WordApplication.Open() does not yet support them. Note | {signature} {parameters} {param:wordApplication}The current WordApplication object which is calling Open{param} {param:docLib}SharePoint Document Library from which the file is being opened{param} {param:fileName}Filename of the document to open from the Document Library{param} {returns}The document that is opened from the Document Library.{returns} {exceptions} {exception:System.Exception}Thrown if an error occurs while opening the document.{exception} {remarks}Though the [WordTemplate|WordTemplate] object currently supports Office Open XML \(Word 2007\) format files, [WordApplication.Open()|WordApplication.Open] does not yet support them. {note}This is an extension method for the WordApplication object to be used for opening documents from a SharePoint Document Library 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 |