Page tree

Versions Compared

Key

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

Excerpt

Represents a Word document.



{remarks}
{example}{code:csharp|title=C#}

          //--- Create a new Word document
          WordApplication app = new WordApplication();
          Document doc = app.Create();

          //--- Open an existing Word document
          WordApplication app = new WordApplication();
          Document doc = app.Open(@"C:\sample.doc");
        
{code}
{code:vb.net
|title=vb.net
}

          '--- Create a new Word document
          Dim app As New WordApplication()
          Dim doc As Document = app.Create()

          '--- Open an existing Word document
          Dim app As New WordApplication()
          Dim doc As Document = app.Open("C:\sample.doc")
        
Signature
C#C#
Wiki Markup
{description}
{excerpt}Represents a Word document.{excerpt}
{signature:C#}
 public sealed class Document : Element
Signature
{signature}{signature:vb.net
vb.net
}
Public NotInheritable Class Document
		Inherits Element
Remarks
To create a new document, use
{signature}
{remarks}To create a new document, use [WordApplication.Create()|WordApplication.Create()].  To open an existing document, use [WordApplication.Open()
.
|WordApplication.Open].

Note: [Document|Document] inherits from [Element|Element] and inherits a lot basic functionality from that class.  Be sure to see the {{Element}} API docs when looking for specific functionality.
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle
Properties

...

Name

...

Description

...

AutoformatType

...

{code}

{example}
{properties}
||Name||Description||
|[AutoformatType|Document.AutoformatType]|{excerpt-include:Document.AutoformatType

...

CompatibilitySettings

|nopanel=true}|
|[CompatibilitySettings|Document.CompatibilitySettings]|{excerpt-include

...

:Document.CompatibilitySettings

...

ChangeTracking

|nopanel=true}|
|[ChangeTracking|Document.ChangeTracking]|{excerpt-include

...

:Document.ChangeTracking

...

DateCreated

|nopanel=true}|
|[DateCreated|Document.DateCreated]|{excerpt-include

...

:Document.DateCreated

...

DatePrinted

|nopanel=true}|
|[DatePrinted|Document.DatePrinted]|{excerpt-include

...

:Document.DatePrinted

...

DateRevised

|nopanel=true}|
|[DateRevised|Document.DateRevised]|{excerpt-include

...

:Document.DateRevised

...

DefaultTabWidth

|nopanel=true}|
|[DefaultTabWidth|Document.DefaultTabWidth]|{excerpt-include

...

:Document.DefaultTabWidth

...

DocumentProperties

|nopanel=true}|
|[DocumentProperties|Document.DocumentProperties]|{excerpt-include

...

:Document.DocumentProperties

...

DocumentProtection

|nopanel=true}|
|[DocumentProtection|Document.DocumentProtection]|{excerpt-include

...

:Document.DocumentProtection

...

GutterPosition

|nopanel=true}|
|[GutterPosition|Document.GutterPosition]|{excerpt-include

...

:Document.GutterPosition

...

HyphenSettings

|nopanel=true}|
|[HyphenSettings|Document.HyphenSettings]|{excerpt-include

...

:Document.HyphenSettings

...

MergeStylesFromTemplate

|nopanel=true}|
|[MergeStylesFromTemplate|Document.MergeStylesFromTemplate]|{excerpt-include

...

:Document.MergeStylesFromTemplate

...

NumCharacters

|nopanel=true}|
|[NumCharacters|Document.NumCharacters]|{excerpt-include

...

:Document.NumCharacters

...

NumPagesOnLastOpen

|nopanel=true}|
|[NumPagesOnLastOpen|Document.NumPagesOnLastOpen]|{excerpt-include

...

:Document.NumPagesOnLastOpen

...

NumParagraphs

|nopanel=true}|
|[NumParagraphs|Document.NumParagraphs]|{excerpt-include

...

:Document.NumParagraphs

...

NumWords

|nopanel=true}|
|[NumWords|Document.NumWords]|{excerpt-include

...

:Document.NumWords

...

PrintDataInFormFields

|nopanel=true}|
|[PrintDataInFormFields|Document.PrintDataInFormFields]|{excerpt-include

...

:Document.PrintDataInFormFields

...

PrintFacingPages

|nopanel=true}|
|[PrintFacingPages|Document.PrintFacingPages]|{excerpt-include

...

:Document.PrintFacingPages

...

SaveDataInFormField

|nopanel=true}|
|[SaveDataInFormField|Document.SaveDataInFormField]|{excerpt-include

...

:Document.SaveDataInFormField

...

Sections

|nopanel=true}|
|[Sections|Document.Sections]|{excerpt-include

...

:Document.Sections

...

Styles

|nopanel=true}|
|[Styles|Document.Styles]|{excerpt-include

...

:Document.Styles

...

UseWidowControl

|nopanel=true}|
|[UseWidowControl|Document.UseWidowControl]|{excerpt-include

...

:Document.UseWidowControl

...

ViewSettings

|nopanel=true}|
|[ViewSettings|Document.ViewSettings]|{excerpt-include

...

:Document.ViewSettings

...

Watermark

|nopanel=true}|
|[Watermark|Document.Watermark]|{excerpt-include

...

:Document.Watermark

...

Methods

...

Name

...

Description

|nopanel=true}|
{methods}
||Name||Description||
|[Append(Document)

...

|Document.Append(Document)

...

]|{excerpt-include:Document.Append(Document)

...

|nopanel

...

=true}|
|[CreateDataImportProperties()

...

|Document.CreateDataImportProperties()

...

]|{excerpt-include:Document.CreateDataImportProperties()

...

|nopanel

...

=true}|
|[CreateFont()

...

|Document.CreateFont()

...

]|{excerpt-include:Document.CreateFont()

...

|nopanel

...

=true}|
|[CreateParagraphFormatting()

...

|Document.CreateParagraphFormatting()

...

]|{excerpt-include:Document.CreateParagraphFormatting()

...

|nopanel

...

=true}|
|[CreateTableFormatting()

...

|Document.CreateTableFormatting()

...

]|{excerpt-include:Document.CreateTableFormatting()

...

|nopanel

...

=true}|
|[GetBookmark(String)

...

|Document.GetBookmark(String)

...

]|{excerpt-include:Document.GetBookmark(String)

...

|nopanel

...

=true}|
|[GetVariable(String)

...

|Document.GetVariable(String)

...

]|{excerpt-include:Document.GetVariable(String)

...

|nopanel

...

=true}|
|[SetVariable(String, String)

...

|Document.SetVariable(String, String)

...

]|{excerpt-include:Document.SetVariable(String, String)

...

|nopanel

...

Classes

...

Name

...

Description

...

Autoformat

...

=true}|
{classes}
||Name||Description||
|[Autoformat|Document.Autoformat]|{excerpt-include:Document.Autoformat

...

Gutter

|nopanel=true}|
|[Gutter|Document.Gutter]|{excerpt-include

...

:Document.Gutter

...

|nopanel=true}|