Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Introducedin
4.1.0.1379
4.1.0.1379
Description

Excerpt

Opens the WordWriter template specified by the templateFileName parameter.

Signature
C#
C#
public static void Open(this WordTemplate template, Microsoft.SharePoint.SPDocumentLibrary docLib, String fileName)
Signature
vb.net
vb.net
Public Static Sub Open(ByVal template As WordTemplate, ByVal docLib As MicroSoft.SharePoint.SPDocumentLibrary, ByVal fileName As String)
Parameters
Param
template
template

The current WordTemplate that is calling Open

Param
docLib
docLib

SharePoint Document Library containing the template file to be opened

Param
fileName
fileName

File name of the template Word file

Exceptions
Exception
ArgumentNullException
ArgumentNullException

Exception
FileNotFoundException
FileNotFoundException

Remarks

A WordWriter template is a file created in Microsoft Word that contains merge fields. WordWriter supports Microsoft Word 97, 2000, 2002 (XP), 2003, and 2007. Do not use Open to open files created in earlier versions of Microsoft Word.

Note

This is an extension method for the WordTemplate 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
titleC#
oWW.Open(myDocLib, "StringTemplate.doc"); 
Code Block
vb.net
vb.net
titlevb.net
oWW.Open(myDocLib, "StringTemplate.doc")