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 and returns an existing [Document|Document] from the specified {msdn:System.IO.Stream

...

Signature
C#C#
|Stream}.{excerpt}
{signature:C#}
 public Document Open(System.IO.Stream stream)
Signature
{signature}{signature:vb.net
vb.net
}
Public Function Open(ByVal stream As System.IO.Stream) As Document
Parameters

...

Stream to read the document from.

Returns

The document contained in the specified stream.

Exceptions

...

Thrown if there is an error opening the document.

Remarks

Though the WordTemplate object currently supports Office Open XML (Word 2007) format files, WordApplication.Open() does not yet support them.

{signature}
{parameters}
{param:stream}Stream to read the document from.{param}
{returns}The document contained in the specified stream.{returns}
{exceptions}
{exception:System.Exception}Thrown if there is an error 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.

{remarks}
{example}{code:csharp|title=C#}
Document doc = app.Open(strm);
{code}
{code:vb.net
|title=vb.net
}
Dim doc As Document = app.Open(strm){code}

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle