Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Wiki Markup
{introducedin:4.1.0.1379

...

Description

Excerpt

Opens the WordWriter template specified by the templateFileName parameter.

Signature
C#C#
}
{description}
{excerpt}Opens the WordWriter template specified by the {{templateFileName}} parameter.{excerpt}
{signature:C#}
public static void Open(this WordTemplate template, Microsoft.SharePoint.SPDocumentLibrary docLib, String fileName)
Signature
{signature}{signature:vb.net
vb.net
}
Public Static Sub Open(ByVal template As WordTemplate, ByVal docLib As MicroSoft.SharePoint.SPDocumentLibrary, ByVal fileName As String)
Parameters

...

The current WordTemplate that is calling Open

...

SharePoint Document Library containing the template file to be opened

...

File name of the template Word file

Exceptions
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
{signature}
{parameters}
{param:template}The current WordTemplate that is calling Open{param}
{param:docLib}SharePoint Document Library containing the template file to be opened{param}
{param:fileName}File name of the template Word file{param}
{exceptions}
{exception:ArgumentNullException}{exception}
{exception:FileNotFoundException}{exception}
{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|WordTemplate.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
{note}
{remarks}
{example}{code:csharp|title=C#}
oWW.Open(myDocLib, "StringTemplate.doc"); 
{code}
{code:vb.net
|title=vb.net
}
oWW.Open(myDocLib, "StringTemplate.doc"){code}

{example}
Exception
ArgumentNullExceptionArgumentNullException
Exception
FileNotFoundExceptionFileNotFoundException
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
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle