Page tree

Versions Compared

Key

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

...

Wiki Markup
{description}
{excerpt}Opens a WordWriter template from a {msdn:System.IO.Stream

...

|System.IO.Stream

...

Signature
C#C#
}. A WordWriter template is a file created in Microsoft Word that contains merge fields.{excerpt}
{signature:C#}
 public void Open(System.IO.Stream templateStream)
Signature
{signature}{signature:vb.net
vb.net
}
Public Sub Open(ByVal templateStream As System.IO.Stream)
Parameters
Param
templateStreamtemplateStreamA
{signature}
{parameters}
{param:templateStream}A {{System.IO.Stream}} object, or a class derived from System.IO.Stream \(for example, System.IO.FileStream\).
Exceptions

...

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.

{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#}
//--- FileStream and FileMode are in System.IO
FileStream oFileStream = new FileStream(@"c:\templates\StringTemplate.doc",
FileMode.Open);
oWW.Open(oFileStream);
{code}
{code:vb.net
|title=vb.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}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle