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

...

Description

Excerpt

Opens a WordWriter template from a

Msdn
System.IO.Stream

...

System.IO.Stream

...

1System.IO.Stream
. A WordWriter template is a file created in Microsoft Word that contains merge fields.

Signature
C#
C#
 public void Open(System.IO.Stream templateStream)
{signature}{signature:
}
Signature
vb.net
vb.net
Public Sub Open(ByVal templateStream As System.IO.Stream)
{signature}
{parameters}
{param:templateStream}A {{
Parameters
Param
templateStream
templateStream

A System.IO.Stream

}}

object,

or

a

class

derived

from

System.IO.Stream

\

(for

example,

System.IO.FileStream

\

).

{param} {exceptions} {exception:ArgumentNullException}{exception} {remarks}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. {remarks} {example}{code:csharp|title=C#}

Exceptions
Exception
ArgumentNullException
ArgumentNullException

Remarks

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.

Example
Code Block
csharp
csharp
titleC#

//--- FileStream and FileMode are in System.IO
FileStream oFileStream = new FileStream(@"c:\templates\StringTemplate.doc",
FileMode.Open);
oWW.Open(oFileStream);
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}

'--- FileStream and FileMode are in System.IO
Dim oFileStream As New FileStream("c:\templates\StringTemplate.doc", _
    FileMode.Open, FileAccess.Read)
oWW.Open(oFileStream)
{code} {example}