Skip to content

Commit

Permalink
Merge pull request #169 from OfficeDev/reorganize
Browse files Browse the repository at this point in the history
Reorganize files to follow table of contents
  • Loading branch information
lindalu-MSFT authored Nov 2, 2023
2 parents 43c80eb + f9fe924 commit e19fcca
Show file tree
Hide file tree
Showing 102 changed files with 389 additions and 552 deletions.
16 changes: 3 additions & 13 deletions docs/about-the-open-xml-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The document parts in an Open XML package are created as XML markup. Because XML

Structurally, an Open XML document is an Open Packaging Conventions (OPC) package. As stated previously, a package is composed of a collection of document parts. Each part has a part name that consists of a sequence of segments or a pathname such as "/word/theme/theme1.xml." The package contains a [Content\_Types].xml part that allows you to determine the content type of all document parts in the package. A set of explicit relationships for a source package or part is contained in a relationships part that ends with the .rels extension.

Word processing documents are described by using WordprocessingML markup. For more information, see [Working with WordprocessingML documents (Open XML SDK)](working-with-wordprocessingml-documents.md). A WordprocessingML document is composed of a collection of stories where each story is one of the following:
Word processing documents are described by using WordprocessingML markup. For more information, see [Working with WordprocessingML documents (Open XML SDK)](word/overview.md). A WordprocessingML document is composed of a collection of stories where each story is one of the following:

- Main document (the only required story)
- Glossary document
Expand All @@ -36,32 +36,22 @@ Word processing documents are described by using WordprocessingML markup. For mo
- Text box
- Footnote and endnote

Presentations are described by using PresentationML markup. For more information, see [Working with PresentationML documents (Open XML SDK)](working-with-presentationml-documents.md). Presentation packages can contain the following document parts:
Presentations are described by using PresentationML markup. For more information, see [Working with PresentationML documents (Open XML SDK)](presentation/overview.md). Presentation packages can contain the following document parts:

- Slide master
- Notes master
- Handout master
- Slide layout
- Notes

Spreadsheet workbooks are described by using SpreadsheetML markup. For more information, see [Working with SpreadsheetML documents (Open XML SDK)](working-with-spreadsheetml-documents.md). Workbook packages can contain:
Spreadsheet workbooks are described by using SpreadsheetML markup. For more information, see [Working with SpreadsheetML documents (Open XML SDK)](spreadsheet/overview.md). Workbook packages can contain:

- Workbook part (required part)
- One or more worksheets
- Charts
- Tables
- Custom XML

## Open XML SDK 1.0

Version 1 of the Open XML SDK simplified the manipulation of Open XML packages. The Open XML SDK Application Programming Interface (API) encapsulates many of the common tasks that you typically perform on Open XML packages, so you can perform complex operations with just a few lines of code. Some common tasks:

- **Search** With a few lines of code, you can search a collection of Excel 2007 worksheets for some arbitrary data.
- **Document assembly** You can create documents by combining the document parts of existing documents programmatically. For example, you can pull slides from various PowerPoint 2007 presentations to create a single presentation.
- **Validation** With a few lines of code, you can validate the document parts in a package or validate an entire package against a schema.
- **Data update** With the Open XML object model, you can easily modify the data in multiple packages.
- **Privacy** With a few lines of code, you can remove comments and other personal information from a document before it is distributed.

## Open XML SDK for Microsoft Office

The SDK supports the following common tasks/scenarios:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ a word-processing document package.

-----------------------------------------------------------------------------

[!include[Structure](./includes/word/structure.md)]
[!include[Structure](../includes/word/structure.md)]

-----------------------------------------------------------------------------
## How the Sample Code Works
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The code starts with opening a package file by passing a file name to one of the
The **using** statement provides a recommended alternative to the typical .Create, .Save, .Close sequence. It ensures that the **Dispose** method (internal method used by the Open XML SDK to clean up resources) is automatically called when the closing brace is reached. The block that follows the **using** statement establishes a scope for the object that is created or named in the **using** statement, in this case **wordDoc**. Because the **WordprocessingDocument** class in the Open XML SDK
automatically saves and closes the object as part of its **System.IDisposable** implementation, and because the **Dispose** method is automatically called when you exit the block; you do not have to explicitly call **Save** and **Close**, as long as you use **using**.

[!include[Structure](./includes/word/structure.md)]
[!include[Structure](../includes/word/structure.md)]

## How the sample code works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ long as you use **using**.

--------------------------------------------------------------------------------

[!include[Structure](./includes/word/structure.md)]
[!include[Structure](../includes/word/structure.md)]

--------------------------------------------------------------------------------
## The Theme Part
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Once you have created the Word document package, you can add parts to
it. To add the main document part you call the [AddMainDocumentPart()](https://msdn.microsoft.com/library/office/documentformat.openxml.packaging.wordprocessingdocument.addmaindocumentpart.aspx) method of the **WordprocessingDocument** class. Having done that,
you can set about adding the document structure and text.

[!include[Structure](./includes/word/structure.md)]
[!include[Structure](../includes/word/structure.md)]

## How the Sample Code Works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ long as you use using.

---------------------------------------------------------------------------------

[!include[Structure](./includes/word/structure.md)]
[!include[Structure](../includes/word/structure.md)]

--------------------------------------------------------------------------------
## Comments Element
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ long as you use **using**.

---------------------------------------------------------------------------------

[!include[Structure](./includes/word/structure.md)]
[!include[Structure](../includes/word/structure.md)]

--------------------------------------------------------------------------------
## Settings Element
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ themes in use applied to a presentation. In this example, you can see
how a theme can affect font, colors, backgrounds, fills, and effects for
different objects in a presentation. end example]

![Theme sample](./media/a-theme01.gif)
![Theme sample](../media/a-theme01.gif)
In this example, we see how a theme can affect font, colors,
backgrounds, fills, and effects for different objects in a presentation.
*end example*]
Expand Down Expand Up @@ -226,10 +226,10 @@ font.
Following is the complete sample code in both C\# and Visual Basic.

### [C#](#tab/cs)
[!code-csharp[](../samples/word/replace_the_theme_part/cs/Program.cs)]
[!code-csharp[](../../samples/word/replace_the_theme_part/cs/Program.cs)]

### [Visual Basic](#tab/vb)
[!code-vb[](../samples/word/replace_the_theme_part/vb/Program.vb)]
[!code-vb[](../../samples/word/replace_the_theme_part/vb/Program.vb)]

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ the text, "Hello world!"
The following is the complete sample code in both C\# and Visual Basic.

### [C#](#tab/cs)
[!code-csharp[](../samples/word/search_and_replace_text_a_part/cs/Program.cs)]
[!code-csharp[](../../samples/word/search_and_replace_text_a_part/cs/Program.cs)]

### [Visual Basic](#tab/vb)
[!code-vb[](../samples/word/search_and_replace_text_a_part/vb/Program.vb)]
[!code-vb[](../../samples/word/search_and_replace_text_a_part/vb/Program.vb)]

--------------------------------------------------------------------------------
## See also
Expand Down
5 changes: 3 additions & 2 deletions docs/packages-and-general.md → docs/general/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ This section provides how-to topics for working with documents and packages usin

## In this section

- [Introduction to markup compatibility](introduction-to-markup-compatibility.md)

- [Add a new document part that receives a relationship ID to a package](how-to-add-a-new-document-part-that-receives-a-relationship-id-to-a-package.md)

- [Add a new document part to a package](how-to-add-a-new-document-part-to-a-package.md)
Expand All @@ -40,5 +42,4 @@ This section provides how-to topics for working with documents and packages usin

## Related sections

- [How do I...](how-do-i.md)
- [Getting started with the Open XML SDK for Office](getting-started.md)
- [Getting started with the Open XML SDK for Office](../getting-started.md)
31 changes: 0 additions & 31 deletions docs/how-do-i.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/includes/word/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Using the Open XML SDK, you can create document structure and content using stro
| r | [Run](https://msdn.microsoft.com/library/office/documentformat.openxml.wordprocessing.run.aspx) | A run. |
| t | [Text](https://msdn.microsoft.com/library/office/documentformat.openxml.wordprocessing.text.aspx) | A range of text. |

For more information about the overall structure of the parts and elements of a WordprocessingML document, see [Structure of a WordprocessingML document (Open XML SDK)](../../structure-of-a-wordprocessingml-document.md).
For more information about the overall structure of the parts and elements of a WordprocessingML document, see [Structure of a WordprocessingML document (Open XML SDK)](../../word/structure-of-a-wordprocessingml-document.md).
14 changes: 11 additions & 3 deletions docs/open-xml-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,19 @@ Portions of ISO/IEC 29500:2008<sup>1</sup> are referenced in the SDK.

## In this section

- [Getting started with the Open XML SDK for Office](getting-started.md)
- [Understanding the Open XML file formats](understanding-the-open-xml-file-formats.md)
- [How do I... (Open XML SDK)](how-do-i.md)
- [Getting started with the Open XML SDK for Office](getting-started.md)
- [Open XML SDK class library reference](/office/open-xml/open-xml-sdk)

## Working with packages

- [Packages](general/overview.md)

- [Presentations](presentation/overview.md)

- [Spreadsheets](spreadsheet/overview.md)

- [Word processing](word/overview.md)

## See also

- [Open XML SDK for Microsoft Office](https://www.nuget.org/packages/DocumentFormat.OpenXml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Office to add a comment to the first slide in a presentation
programmatically.


[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## The Structure of the Comment Element

Expand Down Expand Up @@ -88,10 +88,10 @@ dotnet run -- [filePath] [initials] [name] [test ...]
> To get the exact author name and initials, open the presentation file and click the **File** menu item, and then click **Options**. The **PowerPointOptions** window opens and the content of the **General** tab is displayed. The author name and initials must match the **User name** and **Initials** in this tab.
### [CSharp](#tab/cs)
[!code-csharp[](../samples/presentation/add_comment/cs/Program.cs)]
[!code-csharp[](../../samples/presentation/add_comment/cs/Program.cs)]

### [Visual Basic](#tab/vb)
[!code-vb[](../samples/presentation/add_comment/vb/Program.vb)]
[!code-vb[](../../samples/presentation/add_comment/vb/Program.vb)]

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ object that is created or named in the **using** statement, in this case **theme

-----------------------------------------------------------------------------

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

-----------------------------------------------------------------------------
## Structure of the Theme Element
Expand All @@ -103,7 +103,7 @@ be useful when working with this element.
> backgrounds, fills, and effects for different objects in a
> presentation. end example]
![Theme sample](media/a-theme01.gif)
![Theme sample](../media/a-theme01.gif)
> In this example, we see how a theme can affect font, colors,
> backgrounds, fills, and effects for different objects in a
> presentation. *end example*]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ After running the program, examine the file "Myppt3.pptx" to see the
change in the fill color.

### [C#](#tab/cs)
[!code-csharp[](../samples/presentation/change_the_fill_color_of_a_shape/cs/Program.cs)]
[!code-csharp[](../../samples/presentation/change_the_fill_color_of_a_shape/cs/Program.cs)]

### [Visual Basic](#tab/vb)
[!code-vb[](../samples/presentation/change_the_fill_color_of_a_shape/vb/Program.vb)]
[!code-vb[](../../samples/presentation/change_the_fill_color_of_a_shape/vb/Program.vb)]

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,16 @@ Following is the complete sample C\# and VB code to create a
presentation, given a file path.

### [C#](#tab/cs)
[!code-csharp[](../samples/presentation/create_by_providing_a_file_name/cs/Program.cs)]
[!code-csharp[](../../samples/presentation/create_by_providing_a_file_name/cs/Program.cs)]

### [Visual Basic](#tab/vb)
[!code-vb[](../samples/presentation/create_by_providing_a_file_name/vb/Program.vb)]
[!code-vb[](../../samples/presentation/create_by_providing_a_file_name/vb/Program.vb)]

--------------------------------------------------------------------------------

## See also

[About the Open XML SDK for Office](about-the-open-xml-sdk.md)
[About the Open XML SDK for Office](../about-the-open-xml-sdk.md)

[Structure of a PresentationML Document](structure-of-a-presentationml-document.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ statement.

The **using** statement provides a recommended alternative to the typical .Open, .Save, .Close sequence. It ensures that the **Dispose** method (internal method used by the Open XML SDK to clean up resources) is automatically called when the closing brace is reached. The block that follows the **using** statement establishes a scope for the object that is created or named in the **using** statement, in this case **presentationDocument**.

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## Counting the Number of Slides

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ used by the Open XML SDK to clean up resources) is automatically called
when the closing brace is reached. The block that follows the **using** statement establishes a scope for the
object that is created or named in the **using** statement, in this case *doc*.

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## The Structure of the Comment Element

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ object that is created or named in the **using** statement, in this case **docum

--------------------------------------------------------------------------------

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

--------------------------------------------------------------------------------
## Structure of the Hyperlink Element
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ object that is created or named in the **using** statement, in this case **prese

--------------------------------------------------------------------------------

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## How the Sample Code Works
The sample code consists of three overloads of the **GetAllTextInSlide** method. In the following
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ object that is created or named in the **using** statement, in this case **prese

--------------------------------------------------------------------------------

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## How the Sample Code Works
The sample code starts by counting the number of slides in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ when the closing brace is reached. The block that follows the **using** statemen
object that is created or named in the **using** statement, in this case
*presentationDocument*.

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## How the Sample Code Works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ when the closing brace is reached. The block that follows the **using** statemen
object that is created or named in the **using** statement, in this case
*presentationDocument*.

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## How the Sample Code Works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ used by the Open XML SDK to clean up resources) is automatically called
when the closing brace is reached. The block that follows the **using** statement establishes a scope for the
object that is created or named in the **using** statement, in this case *doc*.

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## Structure of the Shape Text Body

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ object that is created or named in the **using** statement, in this case **prese

--------------------------------------------------------------------------------

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## How the Sample Code Works
In order to move a specific slide in a presentation file to a new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ code segment performs this operation.
End Using
```

[!include[Structure](./includes/presentation/structure.md)]
[!include[Structure](../includes/presentation/structure.md)]

## How the Sample Code Works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ The following is the complete **RetrieveNumberOfSlides** code sample in C\# and
Visual Basic.

### [C#](#tab/cs)
[!code-csharp[](../samples/presentation/retrieve_the_number_of_slides/cs/Program.cs)]
[!code-csharp[](../../samples/presentation/retrieve_the_number_of_slides/cs/Program.cs)]

### [Visual Basic](#tab/vb)
[!code-vb[](../samples/presentation/retrieve_the_number_of_slides/vb/Program.vb)]
[!code-vb[](../../samples/presentation/retrieve_the_number_of_slides/vb/Program.vb)]

---------------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit e19fcca

Please sign in to comment.