diff --git a/docs/about-the-open-xml-sdk-2-5.md b/docs/about-the-open-xml-sdk-2-5.md index 4eb7c85..4582440 100644 --- a/docs/about-the-open-xml-sdk-2-5.md +++ b/docs/about-the-open-xml-sdk-2-5.md @@ -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.htm). 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)](working-with-wordprocessingml-documents.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) @@ -41,7 +41,7 @@ Word processing documents are described by using WordprocessingML markup. For mo - 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.htm). 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)](working-with-presentationml-documents.md). Presentation packages can contain the following document parts: - Slide master @@ -53,7 +53,7 @@ Presentations are described by using PresentationML markup. For more information - Notes -Spreadsheet workbooks are described by using SpreadsheetML markup. For more information, see [Working with SpreadsheetML documents (Open XML SDK)](working-with-spreadsheetml-documents.htm). Workbook packages can contain: +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: - Workbook part (required part) @@ -106,5 +106,5 @@ The SDK supports the following common tasks/scenarios: - Fixes to the Open XML SDK 2.0 for Microsoft Office—Open XML SDK 2.5 includes fixes to known issues in the Open XML SDK 2.0 for Microsoft Office. These include lost whitespaces in PowerPoint presentations and an issue with the Custom UI in Word documents where a specified argument was reported as being out of the range of valid values. -You can find more information about these and other new features of the Open XML SDK 2.5 in the [What's new in the Open XML SDK 2.5 for Office](what-s-new-in-the-open-xml-sdk-2-5.htm) article. +You can find more information about these and other new features of the Open XML SDK 2.5 in the [What's new in the Open XML SDK 2.5 for Office](what-s-new-in-the-open-xml-sdk-2-5.md) article. diff --git a/docs/how-do-i.md b/docs/how-do-i.md index c7a2e69..8db1ecd 100644 --- a/docs/how-do-i.md +++ b/docs/how-do-i.md @@ -21,14 +21,10 @@ This section provides how-to topics for working with the Open XML SDK -------------------------------------------------------------------------------- - [Presentations (Open XML -SDK)](presentations.htm) +[Presentations (Open XML SDK)](presentations.md) - [Packages and general (Open XML -SDK)](packages-and-general.htm) +[Packages and general (Open XML SDK)](packages-and-general.md) - [Spreadsheets (Open XML -SDK)](spreadsheets.htm) +[Spreadsheets (Open XML SDK)](spreadsheets.md) - [Word processing (Open XML -SDK)](word-processing.htm) +[Word processing (Open XML SDK)](word-processing.md) diff --git a/docs/how-to-accept-all-revisions-in-a-word-processing-document.md b/docs/how-to-accept-all-revisions-in-a-word-processing-document.md index ba43972..e2e97a7 100644 --- a/docs/how-to-accept-all-revisions-in-a-word-processing-document.md +++ b/docs/how-to-accept-all-revisions-in-a-word-processing-document.md @@ -116,8 +116,7 @@ The element specifies that there was a revision to the paragraph properties at 0 ----------------------------------------------------------------------------- -The following information from the [ISO/IEC -29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification +The following information from the [ISO/IEC 29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification introduces the Deleted element (**del**). **del (Deleted Paragraph)** @@ -158,8 +157,7 @@ and this deletion was tracked as a revision. ----------------------------------------------------------------------------- -The following information from the [ISO/IEC -29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification +The following information from the [ISO/IEC 29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification introduces the Inserted element (**ins**). **ins (Inserted Table Row)** @@ -265,6 +263,7 @@ accepting deletion changes. deletion.Remove(); } ``` + ```vb ' Handle the deletions. Dim deletions As List(Of OpenXmlElement) = _ @@ -520,9 +519,7 @@ The following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) -[Accepting Revisions in Open XML Word-Processing -Documents](http://msdn.microsoft.com/en-us/library/ee836138.aspx) +[Accepting Revisions in Open XML Word-Processing Documents](http://msdn.microsoft.com/en-us/library/ee836138.aspx) diff --git a/docs/how-to-add-a-comment-to-a-slide-in-a-presentation.md b/docs/how-to-add-a-comment-to-a-slide-in-a-presentation.md index 7621009..a37e60a 100644 --- a/docs/how-to-add-a-comment-to-a-slide-in-a-presentation.md +++ b/docs/how-to-add-a-comment-to-a-slide-in-a-presentation.md @@ -784,7 +784,6 @@ comment string to the first slide in the presentation file Myppt1.pptx. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-add-a-new-document-part-to-a-package.md b/docs/how-to-add-a-new-document-part-to-a-package.md index 2abf088..24803dd 100644 --- a/docs/how-to-add-a-new-document-part-to-a-package.md +++ b/docs/how-to-add-a-new-document-part-to-a-package.md @@ -231,8 +231,7 @@ Following is the complete code example in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-add-custom-ui-to-a-spreadsheet-document.md b/docs/how-to-add-custom-ui-to-a-spreadsheet-document.md index 61a54f0..67991ce 100644 --- a/docs/how-to-add-custom-ui-to-a-spreadsheet-document.md +++ b/docs/how-to-add-custom-ui-to-a-spreadsheet-document.md @@ -22,8 +22,7 @@ Microsoft Excel 2010 or Microsoft Excel 2013 worksheet. It contains an example **AddCustomUI** method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.0](http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124). +To use the sample code in this topic, you must install the [Open XML SDK 2.0](http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124). You must explicitly reference the following assemblies in your project: - WindowsBase diff --git a/docs/how-to-add-tables-to-word-processing-documents.md b/docs/how-to-add-tables-to-word-processing-documents.md index a58f8a7..0f9a21d 100644 --- a/docs/how-to-add-tables-to-word-processing-documents.md +++ b/docs/how-to-add-tables-to-word-processing-documents.md @@ -20,8 +20,7 @@ This topic shows how to use the classes in the Open XML SDK 2.5 for Office to programmatically add a table to a word processing document. It contains an example **AddTable** method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase diff --git a/docs/how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md b/docs/how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md index 7a877ac..c3e62d6 100644 --- a/docs/how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md +++ b/docs/how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md @@ -61,7 +61,7 @@ to which to apply the style. The following sections in this topic explain the implementation of this method and the supporting code, as well as how to call it. The complete -sample code listing can be found in the [Sample Code](8d465a77-6c1b-453a-8375-ecf80d2f1bdc.htm#sampleCode) section at +sample code listing can be found in the [Sample Code](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md#sampleCode) section at the end of this topic. @@ -161,7 +161,7 @@ class="keyword">r, and **t** elements. 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.htm). +SDK)](structure-of-a-wordprocessingml-document.md). ---------------------------------------------------------------------------- @@ -982,9 +982,5 @@ The following is the complete code sample in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) - - - +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-apply-a-theme-to-a-presentation.md b/docs/how-to-apply-a-theme-to-a-presentation.md index a2870f7..3373b60 100644 --- a/docs/how-to-apply-a-theme-to-a-presentation.md +++ b/docs/how-to-apply-a-theme-to-a-presentation.md @@ -700,8 +700,7 @@ would see the same theme of the file Myppt9-theme.pptx. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-calculate-the-sum-of-a-range-of-cells-in-a-spreadsheet-document.md b/docs/how-to-calculate-the-sum-of-a-range-of-cells-in-a-spreadsheet-document.md index 3b6db32..5148132 100644 --- a/docs/how-to-calculate-the-sum-of-a-range-of-cells-in-a-spreadsheet-document.md +++ b/docs/how-to-calculate-the-sum-of-a-range-of-cells-in-a-spreadsheet-document.md @@ -336,7 +336,7 @@ the worksheet. worksheetPart.Worksheet.Save() End Using - End Subxxxxxxx + End Sub ``` To get the row index the code passes a parameter that represents the diff --git a/docs/how-to-change-the-print-orientation-of-a-word-processing-document.md b/docs/how-to-change-the-print-orientation-of-a-word-processing-document.md index 4cd8bb8..95c8e37 100644 --- a/docs/how-to-change-the-print-orientation-of-a-word-processing-document.md +++ b/docs/how-to-change-the-print-orientation-of-a-word-processing-document.md @@ -547,7 +547,6 @@ Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-convert-a-word-processing-document-from-the-docm-to-the-docx-file-format.md b/docs/how-to-convert-a-word-processing-document-from-the-docm-to-the-docx-file-format.md index dbc0048..ee0fee0 100644 --- a/docs/how-to-convert-a-word-processing-document-from-the-docm-to-the-docx-file-format.md +++ b/docs/how-to-convert-a-word-processing-document-from-the-docm-to-the-docx-file-format.md @@ -92,8 +92,7 @@ contain content equivalent to an external XML file, binary file, image file, and so on, depending on the type. The standard that defines how Open XML documents are stored in .zip files is called the Open Packaging Conventions. For more information about the Open Packaging Conventions, -see [ISO/IEC -29500-2](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51459). +see [ISO/IEC 29500-2](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51459). When you create and save a VBA macro in a document, Word adds a new binary part named vbaProject that contains the internal representation diff --git a/docs/how-to-copy-the-contents-of-an-open-xml-package-part-to-a-document-part-in-a-dif.md b/docs/how-to-copy-the-contents-of-an-open-xml-package-part-to-a-document-part-in-a-dif.md index 2743169..f36dc68 100644 --- a/docs/how-to-copy-the-contents-of-an-open-xml-package-part-to-a-document-part-in-a-dif.md +++ b/docs/how-to-copy-the-contents-of-an-open-xml-package-part-to-a-document-part-in-a-dif.md @@ -298,8 +298,7 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-create-a-presentation-document-by-providing-a-file-name.md b/docs/how-to-create-a-presentation-document-by-providing-a-file-name.md index e2609e6..4a61b34 100644 --- a/docs/how-to-create-a-presentation-document-by-providing-a-file-name.md +++ b/docs/how-to-create-a-presentation-document-by-providing-a-file-name.md @@ -793,26 +793,18 @@ presentation, given a file path. #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) -[Structure of a PresentationML -Document](structure-of-a-presentationml-document.htm) +[Structure of a PresentationML Document](structure-of-a-presentationml-document.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) - [How to: Retrieve the number of slides in a -presentation document (Open XML -SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.htm) +[How to: Retrieve the number of slides in a presentation document (Open XML SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-create-and-add-a-character-style-to-a-word-processing-document.md b/docs/how-to-create-and-add-a-character-style-to-a-word-processing-document.md index 36e0820..34deae9 100644 --- a/docs/how-to-create-and-add-a-character-style-to-a-word-processing-document.md +++ b/docs/how-to-create-and-add-a-character-style-to-a-word-processing-document.md @@ -70,8 +70,7 @@ in the user interface). ByVal styleid As String, ByVal stylename As String, Optional ByVal aliases As String = "") ``` -The complete code listing for the method can be found in the [Sample -Code](c38f2c94-f0b5-4bb5-8c95-02e556d4e9f1.htm#sampleCode) section. +The complete code listing for the method can be found in the [Sample Code](how-to-create-and-add-a-character-style-to-a-word-processing-document.md#sampleCode) section. --------------------------------------------------------------------------------- @@ -263,7 +262,7 @@ type attribute: - Default paragraph + character properties -[*Example*: Consider a style called Heading 1 in a document as shown in +*Example*: Consider a style called Heading 1 in a document as shown in the following code example. ```xml @@ -329,8 +328,7 @@ range of text. Figure 1. Text with a character style applied - ![A character style applied to some -text](../media/OpenXmlCon_CreateCharacterStyle_Fig1.gif) + ![A character style applied to some text](../media/OpenXmlCon_CreateCharacterStyle_Fig1.gif) -------------------------------------------------------------------------------- @@ -362,17 +360,13 @@ styles element is created and saved to the part. -------------------------------------------------------------------------------- -To create the style, the code instantiates the Style class and sets certain properties, -such as the Type of style (paragraph), the StyleId, and whether the style is a CustomStyle. ```csharp @@ -406,8 +400,7 @@ corresponding class, and then call the Append([]) method to add the child element to the style. For more information about these properties, see section -17.7 of the [ISO/IEC -29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification. +17.7 of the [ISO/IEC 29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification. ```csharp // Create and add the child elements (properties of the style). diff --git a/docs/how-to-create-and-add-a-paragraph-style-to-a-word-processing-document.md b/docs/how-to-create-and-add-a-paragraph-style-to-a-word-processing-document.md index 79afa9c..1a038f4 100644 --- a/docs/how-to-create-and-add-a-paragraph-style-to-a-word-processing-document.md +++ b/docs/how-to-create-and-add-a-paragraph-style-to-a-word-processing-document.md @@ -729,7 +729,7 @@ C\# and Visual Basic. #### Concepts -[How to: Apply a style to a paragraph in a word processing document (Open XML SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.htm) +[How to: Apply a style to a paragraph in a word processing document (Open XML SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md) #### Other resources diff --git a/docs/how-to-delete-a-slide-from-a-presentation.md b/docs/how-to-delete-a-slide-from-a-presentation.md index 02cc178..7746222 100644 --- a/docs/how-to-delete-a-slide-from-a-presentation.md +++ b/docs/how-to-delete-a-slide-from-a-presentation.md @@ -774,5 +774,4 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md b/docs/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md index 7d8c1a6..0be4b2d 100644 --- a/docs/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md +++ b/docs/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md @@ -464,5 +464,4 @@ The following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-delete-comments-by-all-or-a-specific-author-in-a-word-processing-document.md b/docs/how-to-delete-comments-by-all-or-a-specific-author-in-a-word-processing-document.md index 38f7870..4d765b0 100644 --- a/docs/how-to-delete-comments-by-all-or-a-specific-author-in-a-word-processing-document.md +++ b/docs/how-to-delete-comments-by-all-or-a-specific-author-in-a-word-processing-document.md @@ -497,5 +497,4 @@ The following is the complete code sample in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-delete-text-from-a-cell-in-a-spreadsheet.md b/docs/how-to-delete-text-from-a-cell-in-a-spreadsheet.md index 1b2baa3..1889dfc 100644 --- a/docs/how-to-delete-text-from-a-cell-in-a-spreadsheet.md +++ b/docs/how-to-delete-text-from-a-cell-in-a-spreadsheet.md @@ -684,10 +684,10 @@ The following is the complete code sample in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) -[Language-Integrated Query (LINQ)](http://msdn.microsoft.com/en-us/library/bb397926.aspx) +[Language-Integrated Query (LINQ)](http://msdn.microsoft.com/en-us/library/bb397926.aspx) -[Lambda Expressions](http://msdn.microsoft.com/en-us/library/bb531253.aspx) +[Lambda Expressions](http://msdn.microsoft.com/en-us/library/bb531253.aspx) -[Lambda Expressions (C\# Programming Guide)](http://msdn.microsoft.com/en-us/library/bb397687.aspx) +[Lambda Expressions (C\# Programming Guide)](http://msdn.microsoft.com/en-us/library/bb397687.aspx) diff --git a/docs/how-to-extract-styles-from-a-word-processing-document.md b/docs/how-to-extract-styles-from-a-word-processing-document.md index 663ddb1..85df288 100644 --- a/docs/how-to-extract-styles-from-a-word-processing-document.md +++ b/docs/how-to-extract-styles-from-a-word-processing-document.md @@ -87,8 +87,7 @@ requested does not exist). Optional ByVal getStylesWithEffectsPart As Boolean = True) As XDocument ``` -The complete code listing for the method can be found in the [Sample -Code](20258c39-9411-41f2-8463-e94a4b0fa326.htm#sampleCode) section. +The complete code listing for the method can be found in the [Sample Code](how-to-extract-styles-from-a-word-processing-document.md#sampleCode) section. -------------------------------------------------------------------------------- diff --git a/docs/how-to-get-a-column-heading-in-a-spreadsheet.md b/docs/how-to-get-a-column-heading-in-a-spreadsheet.md index 47c2898..0ec9187 100644 --- a/docs/how-to-get-a-column-heading-in-a-spreadsheet.md +++ b/docs/how-to-get-a-column-heading-in-a-spreadsheet.md @@ -457,14 +457,10 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) -[Language-Integrated Query -(LINQ)](http://msdn.microsoft.com/en-us/library/bb397926.aspx) +[Language-Integrated Query (LINQ)](http://msdn.microsoft.com/en-us/library/bb397926.aspx) -[Lambda -Expressions](http://msdn.microsoft.com/en-us/library/bb531253.aspx) +[Lambda Expressions](http://msdn.microsoft.com/en-us/library/bb531253.aspx) -[Lambda Expressions (C\# Programming -Guide)](http://msdn.microsoft.com/en-us/library/bb397687.aspx) +[Lambda Expressions (C\# Programming Guide)](http://msdn.microsoft.com/en-us/library/bb397687.aspx) diff --git a/docs/how-to-get-all-the-external-hyperlinks-in-a-presentation.md b/docs/how-to-get-all-the-external-hyperlinks-in-a-presentation.md index 54415c8..65b0f8b 100644 --- a/docs/how-to-get-all-the-external-hyperlinks-in-a-presentation.md +++ b/docs/how-to-get-all-the-external-hyperlinks-in-a-presentation.md @@ -374,5 +374,4 @@ get the list of URIs in your presentation. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-get-all-the-text-in-a-slide-in-a-presentation.md b/docs/how-to-get-all-the-text-in-a-slide-in-a-presentation.md index 92b088d..e6e3bf1 100644 --- a/docs/how-to-get-all-the-text-in-a-slide-in-a-presentation.md +++ b/docs/how-to-get-all-the-text-in-a-slide-in-a-presentation.md @@ -96,8 +96,6 @@ that contains the presentation definition. The following text from the specification introduces the overall form of a PresentationML package. -### - > A PresentationML package's main part starts with a presentation root > element. That element contains a presentation, which, in turn, refers > to a slide list, a slide @@ -651,5 +649,4 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-open-a-spreadsheet-document-for-read-only-access.md b/docs/how-to-open-a-spreadsheet-document-for-read-only-access.md index 33eb293..547f797 100644 --- a/docs/how-to-open-a-spreadsheet-document-for-read-only-access.md +++ b/docs/how-to-open-a-spreadsheet-document-for-read-only-access.md @@ -28,6 +28,7 @@ this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; ``` + ```vb Imports System.IO Imports System.IO.Packaging @@ -96,10 +97,12 @@ Method. // Open a SpreadsheetDocument for read-only access based on a filepath. using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Open(filepath, false)) ``` + ```vb ' Open a SpreadsheetDocument for read-only access based on a filepath. Using spreadsheetDocument As SpreadsheetDocument = SpreadsheetDocument.Open(filepath, False) ``` + The other two **Open** methods create an instance of the SpreadsheetDocument class based on an input/output stream. You might use this approach, for example, if you have a @@ -115,11 +118,13 @@ The following code example opens a document based on a stream. using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Open(stream, false)) ``` + ```vb Dim stream As Stream = File.Open(strDoc, FileMode.Open) ' Open a SpreadsheetDocument for read-only access based on a stream. Using spreadsheetDocument As SpreadsheetDocument = SpreadsheetDocument.Open(stream, False) ``` + Suppose you have an application that uses the Open XML support in the System.IO.Packaging namespace of the .NET Framework Class Library, and you want to use the Open XML SDK 2.5 to work with a package as @@ -142,6 +147,7 @@ operation. using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Open(spreadsheetPackage)) ``` + ```vb ' Open System.IO.Packaging.Package. Dim spreadsheetPackage As Package = Package.Open(filepath, FileMode.Open, FileAccess.Read) @@ -149,6 +155,7 @@ operation. ' Open a SpreadsheetDocument based on a package. Using spreadsheetDocument As SpreadsheetDocument = SpreadsheetDocument.Open(spreadsheetPackage) ``` + After you open the spreadsheet document package, you can access the main workbook part. To access the main workbook part, you assign a reference to the existing workbook part, as shown in the following code example. @@ -157,6 +164,7 @@ to the existing workbook part, as shown in the following code example. // Assign a reference to the existing workbook part. WorkbookPart wbPart = document.WorkbookPart; ``` + ```vb ' Assign a reference to the existing workbook part. Dim wbPart As WorkbookPart = document.WorkbookPart @@ -188,6 +196,7 @@ located in the Workbook.xml file and is as follows. ``` + The worksheet XML files contain one or more block level elements such as ``` + Using the Open XML SDK 2.5, you can create document structure and content that uses strongly-typed classes that correspond to SpreadsheetML elements. You can find these classes in the ``` + The worksheet XML files contain one or more block level elements such as ``` + Using the Open XML SDK 2.5, you can create document structure and content that uses strongly-typed classes that correspond to SpreadsheetML elements. You can find these classes in the OpenAddAndAddToSpreadsheetStream method does not close the stream passed to it. The calling code must do that. @@ -266,6 +276,7 @@ The following is the complete sample code in both C\# and Visual Basic. // Caller must close the stream. } ``` + ```vb Public Sub OpenAndAddToSpreadsheetStream(ByVal stream As Stream) ' Open a SpreadsheetDocument based on a stream. @@ -307,5 +318,4 @@ The following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-open-a-word-processing-document-for-read-only-access.md b/docs/how-to-open-a-word-processing-document-for-read-only-access.md index 4b0033a..5e35f00 100644 --- a/docs/how-to-open-a-word-processing-document-for-read-only-access.md +++ b/docs/how-to-open-a-word-processing-document-for-read-only-access.md @@ -28,6 +28,7 @@ this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; ``` + ```vb Imports System.IO Imports System.IO.Packaging @@ -99,10 +100,12 @@ Method. using (WordprocessingDocument wordDocument = WordprocessingDocument.Open(filepath, false)) ``` + ```vb ' Open a WordprocessingDocument for read-only access based on a filepath. Using wordDocument As WordprocessingDocument = WordprocessingDocument.Open(filepath, False) ``` + The other two **Open** methods create an instance of the **WordprocessingDocument** class based on an input/output stream. You might employ this approach, @@ -118,11 +121,13 @@ The following code example opens a document based on a stream. using (WordprocessingDocument wordDocument = WordprocessingDocument.Open(stream, false)) ``` + ```vb Dim stream As Stream = File.Open(strDoc, FileMode.Open) ' Open a WordprocessingDocument for read-only access based on a stream. Using wordDocument As WordprocessingDocument = WordprocessingDocument.Open(stream, False) ``` + Suppose you have an application that employs the Open XML support in the System.IO.Packaging namespace of the .NET Framework Class Library, and you want to use the Open XML SDK 2.5 to work with a package read only. @@ -145,6 +150,7 @@ this operation. using (WordprocessingDocument wordDocument = WordprocessingDocument.Open(wordPackage)) ``` + ```vb ' Open System.IO.Packaging.Package. Dim wordPackage As Package = Package.Open(filepath, FileMode.Open, FileAccess.Read) @@ -152,6 +158,7 @@ this operation. ' Open a WordprocessingDocument based on a package. Using wordDocument As WordprocessingDocument = WordprocessingDocument.Open(wordPackage) ``` + Once you open the Word document package, you can access the main document part. To access the body of the main document part, you assign a reference to the existing document body, as shown in the following @@ -161,6 +168,7 @@ code example. // Assign a reference to the existing document body. Body body = wordprocessingDocument.MainDocumentPart.Document.Body; ``` + ```vb ' Assign a reference to the existing document body. Dim body As Body = wordprocessingDocument.MainDocumentPart.Document.Body @@ -192,6 +200,7 @@ shown in the following code example. ``` + Using the Open XML SDK 2.5, you can create document structure and content using strongly-typed classes that correspond to WordprocessingML elements. You will find these classes in the OpenWordprocessingPackageReadonly, shows how to open a Word document for read-only access from a @@ -265,10 +277,12 @@ Word12.docx file in the Public Documents folder for read-only access. ```csharp OpenWordprocessingPackageReadonly(@"c:\Users\Public\Public Documents\Word12.docx"); ``` + ```vb OpenWordprocessingPackageReadonly("c:\Users\Public\Public Documents\Word12.docx") ``` -> ![](./media/alert_caution.gif)**Important note** + +> [!IMPORTANT] > If you uncomment the statement that saves the file, the program would throw an **IOException** because the file is opened for read-only access. The following is the complete sample code in C\# and VB. @@ -318,6 +332,7 @@ The following is the complete sample code in C\# and VB. wordPackage.Close(); } ``` + ```vb Public Sub OpenWordprocessingDocumentReadonly(ByVal filepath As String) ' Open a WordprocessingDocument based on a filepath. @@ -362,5 +377,4 @@ The following is the complete sample code in C\# and VB. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-open-a-word-processing-document-from-a-stream.md b/docs/how-to-open-a-word-processing-document-from-a-stream.md index d4458bf..ac26e24 100644 --- a/docs/how-to-open-a-word-processing-document-from-a-stream.md +++ b/docs/how-to-open-a-word-processing-document-from-a-stream.md @@ -27,6 +27,7 @@ this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; ``` + ```vb Imports System.IO Imports DocumentFormat.OpenXml.Packaging @@ -84,6 +85,7 @@ method. WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream, true); ``` + ```vb ' Open a WordProcessingDocument based on a stream. Dim wordprocessingDocument As WordprocessingDocument = _ @@ -116,6 +118,7 @@ the WordprocessingML markup for a document that contains only the text ``` + Using the Open XML SDK 2.5, you can create document structure and content using strongly-typed classes that correspond to WordprocessingML elements. You can find these classes in the Run, and **Text** @@ -163,6 +168,7 @@ the sample code add the paragraph, run, and text. Run run = para.AppendChild(new Run()); run.AppendChild(new Text(txt)); ``` + ```vb ' Add new text. Dim para As Paragraph = body.AppendChild(New Paragraph()) @@ -187,6 +193,7 @@ Word13.docx file in the Public Documents folder and adds text to it. OpenAndAddToWordprocessingStream(stream, txt); stream.Close(); ``` + ```vb Dim strDoc As String = "C:\Users\Public\Documents\Word13.docx" Dim txt As String = "Append text in body - OpenAndAddToWordprocessingStream" @@ -194,7 +201,8 @@ Word13.docx file in the Public Documents folder and adds text to it. OpenAndAddToWordprocessingStream(stream, txt) stream.Close() ``` -> ![](./media/alert_note.gif)**Note** + +> [!NOTE] > Notice that the **OpenAddAddToWordprocessingStream** method does not close the stream passed to it. The calling code must do that. Following is the complete sample code in both C\# and Visual Basic. @@ -220,6 +228,7 @@ Following is the complete sample code in both C\# and Visual Basic. // Caller must close the stream. } ``` + ```vb Public Sub OpenAndAddToWordprocessingStream(ByVal stream As Stream, ByVal txt As String) ' Open a WordProcessingDocument based on a stream. @@ -244,5 +253,4 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-parse-and-read-a-large-spreadsheet.md b/docs/how-to-parse-and-read-a-large-spreadsheet.md index 32d023a..4a88116 100644 --- a/docs/how-to-parse-and-read-a-large-spreadsheet.md +++ b/docs/how-to-parse-and-read-a-large-spreadsheet.md @@ -18,9 +18,7 @@ ms.date: 11/01/2017 This topic shows how to use the classes in the Open XML SDK 2.5 for Office to programmatically read a large Excel file. For more information about the basic structure of a SpreadsheetML document, see [Structure of a SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.md). +class="keyword">SpreadsheetML document, see [Structure of a SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md). You must use the following **using** directives or **Imports** statements to compile the code @@ -33,6 +31,7 @@ in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; ``` + ```vb Imports System Imports System.Linq @@ -76,6 +75,7 @@ because the document is opened as read-only. // Code removed here. } ``` + ```vb ' Open the document for editing. Using spreadsheetDocument As SpreadsheetDocument = _ @@ -114,6 +114,7 @@ the DOM approach. } } ``` + ```vb Dim workbookPart As WorkbookPart = spreadsheetDocument.WorkbookPart Dim worksheetPart As WorksheetPart = workbookPart.WorksheetParts.First() @@ -126,6 +127,7 @@ the DOM approach. Next Next ``` + The following code segment performs an identical task to the preceding sample (reading a very large Excel file), but uses the SAX approach. This is the recommended approach for reading very large files. @@ -145,6 +147,7 @@ This is the recommended approach for reading very large files. } } ``` + ```vb Dim workbookPart As WorkbookPart = spreadsheetDocument.WorkbookPart Dim worksheetPart As WorksheetPart = workbookPart.WorksheetParts.First() @@ -178,12 +181,14 @@ exclude. ReadExcelFileDOM(fileName); // DOM ReadExcelFileSAX(fileName); // SAX ``` + ```vb Dim fileName As String = "C:\Users\Public\Documents\BigFile.xlsx" ' Comment one of the following lines to test each method separately. ReadExcelFileDOM(fileName) ' DOM ReadExcelFileSAX(fileName) ' SAX ``` + The following is the complete code sample in both C\# and Visual Basic. ```csharp @@ -234,6 +239,7 @@ The following is the complete code sample in both C\# and Visual Basic. } } ``` + ```vb ' The DOM approach. ' Note that the this code works only for cells that contain numeric values. @@ -280,10 +286,8 @@ The following is the complete code sample in both C\# and Visual Basic. #### Concepts - [Structure of a SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.md) +[Structure of a SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md) #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-remove-a-document-part-from-a-package.md b/docs/how-to-remove-a-document-part-from-a-package.md index b3d15f1..3ce95e7 100644 --- a/docs/how-to-remove-a-document-part-from-a-package.md +++ b/docs/how-to-remove-a-document-part-from-a-package.md @@ -26,6 +26,7 @@ this topic. using System; using DocumentFormat.OpenXml.Packaging; ``` + ```vb Imports System Imports DocumentFormat.OpenXml.Packaging @@ -66,12 +67,14 @@ should be opened in read/write mode. // Insert other code here. } ``` + ```vb ' Open a Wordprocessing document for editing. Using wordDoc As WordprocessingDocument = WordprocessingDocument.Open(document, True) ' Insert other code here. End Using ``` + The **using** statement provides a recommended alternative to the typical .Create, .Save, .Close sequence. It ensures that the **Dispose** method (internal method @@ -116,6 +119,7 @@ sample code creates is shown in the following code example. ``` + Using the Open XML SDK 2.5, you can create document structure and content using strongly-typed classes that correspond to WordprocessingML elements. You can find these @@ -155,6 +159,7 @@ class="keyword">PresentationML package. ``` + > The **settings** element contains all of the > settings for this document. In this case, the two settings applied are > automatic tab stop increments of 0.5" using the ![](./media/alert_note.gif)**Note** +> [!NOTE] > Before running the program on the test file, "MyPkg6.docs," for example, open the file by using the Open XML SDK 2.5 Productivity Tool for Microsoft Office and examine its structure. After running the program, examine the file again, and you will notice that the **DocumentSettingsPart** part was removed. Following is the complete code example in both C\# and Visual Basic. @@ -222,6 +229,7 @@ Following is the complete code example in both C\# and Visual Basic. } } ``` + ```vb ' To remove a document part from a package. Public Sub RemovePart(ByVal document As String) @@ -237,5 +245,4 @@ Following is the complete code example in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-remove-hidden-text-from-a-word-processing-document.md b/docs/how-to-remove-hidden-text-from-a-word-processing-document.md index f099ecb..0d24aac 100644 --- a/docs/how-to-remove-hidden-text-from-a-word-processing-document.md +++ b/docs/how-to-remove-hidden-text-from-a-word-processing-document.md @@ -27,6 +27,7 @@ this topic. using DocumentFormat.OpenXml.Packaging; using System.Xml; ``` + ```vb Imports System.IO Imports DocumentFormat.OpenXml.Packaging @@ -50,12 +51,14 @@ to enable editing the document. // Insert other code here. } ``` + ```vb Using wdDoc As WordprocessingDocument = _ WordprocessingDocument.Open(filepath, True) ' Insert other code here. End Using ``` + The **using** statement provides a recommended alternative to the typical .Create, .Save, .Close sequence. It ensures that the **Dispose** method (internal method @@ -98,6 +101,7 @@ markup for a document that contains the text "Example text." ``` + Using the Open XML SDK 2.5, you can create document structure and content using strongly-typed classes that correspond to WordprocessingML elements. You will find these @@ -131,8 +135,7 @@ direct formatting, setting it to **true** or **false** sets the absolute state of the resulting property. -The following information from the [ISO/IEC -29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification +The following information from the [ISO/IEC 29500](http://go.microsoft.com/fwlink/?LinkId=194337) specification introduces the **vanish** element. > **vanish (Hidden Text)** @@ -158,6 +161,7 @@ introduces the **vanish** element. ``` + > This run declares that the **vanish** property is set for the contents > of this run, so the contents of this run will be hidden when the > document contents are displayed. *end example*] @@ -171,6 +175,7 @@ The following XML schema segment defines the contents of this element. ``` + The **val** property in the code above is a binary value that can be turned on or off. If given a value of **on**, **1**, or true the property is turned on. If given the @@ -189,12 +194,14 @@ named "Word14.docx." string docName = @"C:\Users\Public\Documents\Word14.docx"; WDDeleteHiddenText(docName); ``` + ```vb Dim docName As String = "C:\Users\Public\Documents\Word14.docx" WDDeleteHiddenText(docName) ``` -> ![](./media/alert_note.gif)**Note** -> This example assumes that the file Word14.docx contains some hidden text. In order to hide part of the file text, select it, and click CTRL+D to show the Font dialog box. Select the Hidden box and click OK. + +> [!NOTE] +> This example assumes that the file Word14.docx contains some hidden text. In order to hide part of the file text, select it, and click CTRL+D to show the **Font** dialog box. Select the **Hidden** box and click **OK**. Following is the complete sample code in both C\# and Visual Basic. @@ -233,6 +240,7 @@ Following is the complete sample code in both C\# and Visual Basic. } } ``` + ```vb Public Sub WDDeleteHiddenText(ByVal docName As String) ' Given a document name, delete all the hidden text. @@ -268,5 +276,4 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-remove-the-headers-and-footers-from-a-word-processing-document.md b/docs/how-to-remove-the-headers-and-footers-from-a-word-processing-document.md index a266df2..4bc72a5 100644 --- a/docs/how-to-remove-the-headers-and-footers-from-a-word-processing-document.md +++ b/docs/how-to-remove-the-headers-and-footers-from-a-word-processing-document.md @@ -21,8 +21,7 @@ processing document. It contains an example RemoveHeadersAndFooters method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must then explicitly reference the following assemblies in your project. - WindowsBase @@ -39,6 +38,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; ``` + ```vb Imports DocumentFormat.OpenXml Imports DocumentFormat.OpenXml.Packaging @@ -60,11 +60,13 @@ modify. ```csharp public static void RemoveHeadersAndFooters(string filename) ``` + ```vb Public Sub RemoveHeadersAndFooters(ByVal filename As String) ``` + The complete code listing for the method can be found in the [Sample -Code](22f973f4-58d1-4dd4-943e-a15ac2571b7c.md#sampleCode) section. +Code](how-to-remove-the-headers-and-footers-from-a-word-processing-document.md#sampleCode) section. -------------------------------------------------------------------------------- @@ -76,6 +78,7 @@ in the following code example. ```csharp RemoveHeadersAndFooters(@"C:\Users\Public\Documents\Headers.docx"); ``` + ```vb RemoveHeadersAndFooters("C:\Users\Public\Documents\Headers.docx") ``` @@ -104,6 +107,7 @@ class="code">docPart. // Code removed here... } ``` + ```vb ' Given a document name, remove all of the headers and footers ' from the document. @@ -144,6 +148,7 @@ class="nolink">FooterPart objects, respectively. // Code removed here... } ``` + ```vb ' Get a reference to the main document part. Dim docPart = doc.MainDocumentPart @@ -174,6 +179,7 @@ write yourself. docPart.DeleteParts(docPart.HeaderParts); docPart.DeleteParts(docPart.FooterParts); ``` + ```vb ' Remove the header and footer parts. docPart.DeleteParts(docPart.HeaderParts) @@ -199,6 +205,7 @@ shown in the section that follows the following code example. // Save the changes. document.Save(); ``` + ```vb ' Get a reference to the root element of the main ' document part. @@ -251,6 +258,7 @@ the operation with the footer elements. footer.Remove(); } ``` + ```vb ' Remove all references to the headers and footers. @@ -332,6 +340,7 @@ Visual Basic. } } ``` + ```vb ' To remove all of the headers and footers in a document. Public Sub RemoveHeadersAndFooters(ByVal filename As String) @@ -387,5 +396,4 @@ Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-replace-the-header-in-a-word-processing-document.md b/docs/how-to-replace-the-header-in-a-word-processing-document.md index 4a76b3b..f7a42b1 100644 --- a/docs/how-to-replace-the-header-in-a-word-processing-document.md +++ b/docs/how-to-replace-the-header-in-a-word-processing-document.md @@ -19,8 +19,7 @@ This topic shows how to use the classes in the Open XML SDK 2.5 for Office to replace the header in word processing document programmatically. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -37,6 +36,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; ``` + ```vb Imports System.Collections.Generic Imports System.Linq @@ -103,23 +103,16 @@ rules shall apply. or, if this is the first section in the document, a new blank header shall be created. -[*Example*: Consider a three page document with different first, odd, +*Example*: Consider a three page document with different first, odd, and even page header defined as follows: -![Three page document with different -headers](./media/w-headerref01.gif) +![Three page document with different headers](./media/w-headerref01.gif) This document defines three headers, each of which has a relationship from the document part with a unique relationship ID, as shown in the following packaging markup: - -  - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```xml @@ -127,17 +120,14 @@ code](./media/copycode.gif "Copy code")Copy code … +``` These relationships are then referenced in the section's properties using the following WordprocessingML:   - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```xml @@ -145,6 +135,7 @@ code](./media/copycode.gif "Copy code")Copy code … +``` The resulting section shall use the header part with relationship id rId3 for the first page, the header part with @@ -168,11 +159,13 @@ segment as an example. string filepathTo=@"C:\Users\Public\Documents\Word15b.docx"; AddHeaderFromTo(filepathFrom, filepathTo); ``` + ```vb Dim filepathFrom As String = "C:\Users\Public\Documents\word15a.docx" Dim filepathTo As String = "C:\Users\Public\Documents\Word15b.docx" AddHeaderFromTo(filepathFrom, filepathTo) ``` + Following is the complete sample code in both C\# and Visual Basic. ```csharp @@ -223,6 +216,7 @@ Following is the complete sample code in both C\# and Visual Basic. } } ``` + ```vb Public Sub AddHeaderFromTo(ByVal filepathFrom As String, ByVal filepathTo As String) ' Replace header in target document with header of source document. @@ -266,5 +260,4 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-replace-the-styles-parts-in-a-word-processing-document.md b/docs/how-to-replace-the-styles-parts-in-a-word-processing-document.md index 73caa35..cae981b 100644 --- a/docs/how-to-replace-the-styles-parts-in-a-word-processing-document.md +++ b/docs/how-to-replace-the-styles-parts-in-a-word-processing-document.md @@ -22,8 +22,7 @@ contains an example **ReplaceStyles** method to illustrate this task, as well as the **ReplaceStylesPart** and **ExtractStylesPart** supporting methods. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -40,6 +39,7 @@ the code in this topic. using System.Xml.Linq; using DocumentFormat.OpenXml.Packaging; ``` + ```vb Imports System.IO Imports System.Xml @@ -55,8 +55,7 @@ a particular content type, and can contain content equal to the content of an external XML file, binary file, image file, and so on, depending on the type. The standard that defines how Open XML documents are stored in .zip files is called the Open Packaging Conventions. For more -information about the Open Packaging Conventions, see [ISO/IEC -29500-2](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51459). +information about the Open Packaging Conventions, see [ISO/IEC 29500-2](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.md?csnumber=51459). Styles are stored in dedicated parts within a word processing document package. An Microsoft Word 2010 document contains a single styles part. @@ -68,8 +67,7 @@ document that contains styles. Figure 1. Styles parts in a word processing document - ![Styles parts in a word processing -document.](./media/OpenXmlCon_HowToReplaceStyles_Fig1.gif) + ![Styles parts in a word processing document.](./media/OpenXmlCon_HowToReplaceStyles_Fig1.gif) In order to provide for "round-tripping" a document from Word 2013 to Word 2010 and back, Word 2013 maintains both the original styles part and the new styles part. (The Office Open XML File Formats specification @@ -94,13 +92,14 @@ effectively completely replacing the styles. ```csharp public static void ReplaceStyles(string fromDoc, string toDoc) ``` + ```vb Public Sub ReplaceStyles(fromDoc As String, toDoc As String) ``` + The complete code listing for the ReplaceStyles method and its supporting methods -can be found in the [Sample -Code](67edb37c-cfec-461c-b616-5a8b7d074c91.md#sampleCode) section. +can be found in the [Sample Code](how-to-replace-the-styles-parts-in-a-word-processing-document.md#sampleCode) section. -------------------------------------------------------------------------------- @@ -118,6 +117,7 @@ document will reflect the new styles. const string toDoc = @"C:\Users\Public\Documents\StylesTo.docx"; ReplaceStyles(fromDoc, toDoc); ``` + ```vb Const fromDoc As String = "C:\Users\Public\Documents\StylesFrom.docx" Const toDoc As String = "C:\Users\Public\Documents\StylesTo.docx" @@ -143,6 +143,7 @@ target document. if (node != null) ReplaceStylesPart(toDoc, node, false); ``` + ```vb ' Extract and replace the styles part. Dim node = ExtractStylesPart(fromDoc, False) @@ -168,6 +169,7 @@ stylesWithEffects part. ReplaceStylesPart(toDoc, node); return; ``` + ```vb ' Extract and replace the stylesWithEffects part. To fully support ' round-tripping from Word 2013 to Word 2010, you should @@ -208,6 +210,7 @@ from a source document). public static void ReplaceStylesPart(string fileName, XDocument newStyles, bool setStylesWithEffectsPart = true) ``` + ```vb Public Sub ReplaceStylesPart( ByVal fileName As String, ByVal newStyles As XDocument, @@ -244,6 +247,7 @@ class="code">stylesPart to hold a reference to the styles part. // stylesPart variable. StylesPart stylesPart = null; ``` + ```vb ' Open the document for write access and get a reference. Using document = WordprocessingDocument.Open(fileName, True) @@ -270,6 +274,7 @@ class="code">stylesPart variable. else stylesPart = docPart.StyleDefinitionsPart; ``` + ```vb If setStylesWithEffectsPart Then stylesPart = docPart.StylesWithEffectsPart @@ -300,6 +305,7 @@ the XDocument, saving its contents into the styles part. FileMode.Create, FileAccess.Write))); } ``` + ```vb ' If the part exists, populate it with the new styles. If stylesPart IsNot Nothing Then @@ -404,6 +410,7 @@ Basic. return styles; } ``` + ```vb ' Replace the styles in the "to" document with the styles ' in the "from" document. @@ -495,5 +502,4 @@ Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-replace-the-theme-part-in-a-word-processing-document.md b/docs/how-to-replace-the-theme-part-in-a-word-processing-document.md index 27d3721..49393b8 100644 --- a/docs/how-to-replace-the-theme-part-in-a-word-processing-document.md +++ b/docs/how-to-replace-the-theme-part-in-a-word-processing-document.md @@ -26,6 +26,7 @@ this topic. using System.IO; using DocumentFormat.OpenXml.Packaging; ``` + ```vb Imports System.IO Imports DocumentFormat.OpenXml.Packaging @@ -66,11 +67,13 @@ to **true** to enable editing the document. // Insert other code here. } ``` + ```vb Using wordDoc As WordprocessingDocument = WordprocessingDocument.Open(document, True) ' Insert other code here. End Using ``` + The **using** statement provides a recommended alternative to the typical .Open, .Save, .Close sequence. It ensures that the **Dispose** method (internal method @@ -157,6 +160,7 @@ manner: ``` + This complex type also holds a CT\_OfficeArtExtensionList, which is used for future extensibility of this complex type. @@ -179,6 +183,7 @@ delete the old theme part. // Delete the old document part. mainPart.DeletePart(mainPart.ThemePart); ``` + ```vb Public Shared Sub ReplaceTheme(ByVal document As String, ByVal themeFile As String) Using wordDoc As WordprocessingDocument = WordprocessingDocument.Open(document, True) @@ -205,6 +210,7 @@ class="keyword">StreamWriter objects to copy the theme from the streamWriter.Write(streamReader.ReadToEnd()); } ``` + ```vb ' Add a new document part and then add content. Dim themePart As ThemePart = mainPart.AddNewPart(Of ThemePart)() @@ -232,11 +238,13 @@ you can use the following call example to copy the theme from the file string themeFile = @"C:\Users\Public\Documents\Theme1.xml"; ReplaceTheme(document, themeFile); ``` + ```vb Dim document As String = "C:\Users\Public\Documents\\MyPkg7.docx" Dim themeFile As String = "C:\Users\Public\Documents\Theme1.xml" ReplaceTheme(document, themeFile) ``` + After you run the program open the Word file and notice the change in font. @@ -266,6 +274,7 @@ Following is the complete sample code in both C\# and Visual Basic. } } ``` + ```vb ' This method can be used to replace a document part in a package. Public Sub ReplaceTheme(ByVal document As String, ByVal themeFile As String) @@ -294,5 +303,4 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-retrieve-a-dictionary-of-all-named-ranges-in-a-spreadsheet.md b/docs/how-to-retrieve-a-dictionary-of-all-named-ranges-in-a-spreadsheet.md index 62a4747..2402aa8 100644 --- a/docs/how-to-retrieve-a-dictionary-of-all-named-ranges-in-a-spreadsheet.md +++ b/docs/how-to-retrieve-a-dictionary-of-all-named-ranges-in-a-spreadsheet.md @@ -21,8 +21,7 @@ and ranges of all defined names in an Microsoft Excel 2010 or Microsoft Excel 2013 workbook. It contains an example **GetDefinedNames** method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -39,6 +38,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; ``` + ```vb Imports DocumentFormat.OpenXml.Packaging Imports DocumentFormat.OpenXml.Spreadsheet @@ -57,10 +57,12 @@ specified workbook, which may be empty if there are no defined names. public static Dictionary GetDefinedNames(String fileName) ``` + ```vb Public Function GetDefinedNames( ByVal fileName As String) As Dictionary(Of String, String) ``` + The method examines the workbook that you specify, looking for the part that contains defined names. If it exists, the code iterates through all the contents of the part, adding the name and value for each defined @@ -81,6 +83,7 @@ and displays the key and value from each item. foreach (var dn in result) Console.WriteLine("{0} {1}", dn.Key, dn.Value); ``` + ```vb Dim result = GetDefinedNames("C:\Users\Public\Documents\definednames.xlsx") @@ -101,6 +104,7 @@ exits. // Code removed here… return returnValue; ``` + ```vb ' Given a workbook name, return a dictionary of defined names. ' The pairs include the range name and a string representing the range. @@ -108,6 +112,7 @@ exits. ' Code removed here… Return returnValue ``` + The code continues by opening the spreadsheet document, using the GetHiddenRowsOrCols method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -42,6 +41,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; ``` + ```vb Imports System.IO Imports DocumentFormat.OpenXml.Packaging @@ -65,6 +65,7 @@ parameters, indicating the following: public static List GetHiddenRowsOrCols( string fileName, string sheetName, bool detectRows) ``` + ```vb Public Function GetHiddenRowsOrCols( ByVal fileName As String, ByVal sheetName As String, @@ -87,6 +88,7 @@ shown in the following example code. sw.WriteLine(item); Console.WriteLine(sw.ToString()); ``` + ```vb Const fileName As String = "C:\Users\Public\Documents\RetrieveHiddenRowsCols.xlsx" Dim items As List(Of UInteger) = @@ -106,9 +108,11 @@ class="code">itemList, that will contain the return value. ```csharp List itemList = new List(); ``` + ```vb Dim itemList As New List(Of UInteger) ``` + Next, the code opens the document, by using the SpreadsheetDocument.Open method and @@ -127,6 +131,7 @@ class="nolink">WorkbookPart property of the document. // Code removed here... } ``` + ```vb Using document As SpreadsheetDocument = SpreadsheetDocument.Open(fileName, False) @@ -135,6 +140,7 @@ class="nolink">WorkbookPart property of the document. ' Code removed here... End Using ``` + To find the hidden rows or columns, the code must first retrieve a reference to the specified sheet, given its name. This is not as easy as you might think. The code must look through all the sheet-type @@ -162,12 +168,14 @@ to accomplish this is to use a LINQ query. throw new ArgumentException("sheetName"); } ``` + ```vb Dim theSheet As Sheet = wbPart.Workbook.Descendants(Of Sheet)(). Where(Function(s) s.Name = sheetName).FirstOrDefault() If theSheet Is Nothing Then Throw New ArgumentException("sheetName") ``` + The [FirstOrDefault](http://msdn2.microsoft.com/EN-US/library/bb358452) method returns either the first matching reference (a sheet, in this @@ -197,6 +205,7 @@ class="nolink">WorkbookPart object. // Code removed here... } ``` + ```vb Else ' The sheet does exist. @@ -225,6 +234,7 @@ retrieve information about rows or columns. // Code removed here... } ``` + ```vb If detectRows Then ' Retrieve hidden rows. @@ -234,6 +244,7 @@ retrieve information about rows or columns. ' Code removed here... End If ``` + The code that actually retrieves the list of hidden rows requires only a single line of code. @@ -242,12 +253,14 @@ single line of code. Where((r) => r.Hidden != null && r.Hidden.Value). Select(r => r.RowIndex.Value).ToList(); ``` + ```vb itemList = ws.Descendants(Of Row). Where(Function(r) r.Hidden IsNot Nothing AndAlso r.Hidden.Value). Select(Function(r) r.RowIndex.Value).ToList() ``` + This single line accomplishes a lot, however. It starts by calling the Max value, inclusively). } } ``` + ```vb Dim cols = ws.Descendants(Of Column). Where(Function(c) c.Hidden IsNot Nothing AndAlso @@ -370,6 +384,7 @@ Basic. return itemList; } ``` + ```vb Public Function GetHiddenRowsOrCols( ByVal fileName As String, ByVal sheetName As String, @@ -425,5 +440,4 @@ Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-retrieve-a-list-of-the-hidden-worksheets-in-a-spreadsheet.md b/docs/how-to-retrieve-a-list-of-the-hidden-worksheets-in-a-spreadsheet.md index 39ebb91..92e52a6 100644 --- a/docs/how-to-retrieve-a-list-of-the-hidden-worksheets-in-a-spreadsheet.md +++ b/docs/how-to-retrieve-a-list-of-the-hidden-worksheets-in-a-spreadsheet.md @@ -21,8 +21,7 @@ Microsoft Excel 2010 or Microsoft Excel 2010 workbook, without loading the document into Excel. It contains an example GetHiddenSheets method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -40,6 +39,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; ``` + ```vb Imports DocumentFormat.OpenXml.Spreadsheet Imports DocumentFormat.OpenXml.Packaging @@ -57,9 +57,11 @@ examine. ```csharp public static List GetHiddenSheets(string fileName) ``` + ```vb Public Function GetHiddenSheets(ByVal fileName As String) As List(Of Sheet) ``` + The method works with the workbook you specify, filling a [List\](http://msdn2.microsoft.com/EN-US/library/6sh2ey19) @@ -85,6 +87,7 @@ required parameter value, as shown in the following code. Console.WriteLine(sheet.Name); } ``` + ```vb ' Revise this path to the location of a file that contains hidden worksheets. Const DEMOPATH As String = @@ -103,9 +106,11 @@ information about the hidden worksheets. ```csharp List returnVal = new List(); ``` + ```vb Dim returnVal As New List(Of Sheet) ``` + Next, the following code opens the specified workbook by using the wbPart. } return returnVal; ``` + ```vb Using document As SpreadsheetDocument = SpreadsheetDocument.Open(fileName, False) Dim wbPart As WorkbookPart = document.WorkbookPart @@ -160,6 +166,7 @@ the sheet child elements of the workbook's XML content. ```csharp var sheets = wbPart.Workbook.Descendants(); ``` + ```vb Dim sheets = wbPart.Workbook.Descendants(Of Sheet)() ``` @@ -202,6 +209,7 @@ value is either **SheetStateValues.Hidden** or (item.State.Value == SheetStateValues.Hidden || item.State.Value == SheetStateValues.VeryHidden)); ``` + ```vb Dim hiddenSheets = sheets.Where(Function(item) item.State IsNot Nothing AndAlso item.State.HasValue _ @@ -216,6 +224,7 @@ sheets, placing the result into the return value for the function. ```csharp returnVal = hiddenSheets.ToList(); ``` + ```vb returnVal = hiddenSheets.ToList() ``` @@ -250,6 +259,7 @@ Basic. return returnVal; } ``` + ```vb Public Function GetHiddenSheets(ByVal fileName As String) As List(Of Sheet) Dim returnVal As New List(Of Sheet) @@ -278,5 +288,4 @@ Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-retrieve-a-list-of-the-worksheets-in-a-spreadsheet.md b/docs/how-to-retrieve-a-list-of-the-worksheets-in-a-spreadsheet.md index 8afe121..0e12648 100644 --- a/docs/how-to-retrieve-a-list-of-the-worksheets-in-a-spreadsheet.md +++ b/docs/how-to-retrieve-a-list-of-the-worksheets-in-a-spreadsheet.md @@ -21,8 +21,7 @@ Microsoft Excel 2010 or Microsoft Excel 2013 workbook, without loading the document into Excel. It contains an example GetAllWorksheets method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -38,6 +37,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; ``` + ```vb Imports DocumentFormat.OpenXml.Packaging Imports DocumentFormat.OpenXml.Spreadsheet @@ -55,9 +55,11 @@ examine. ```csharp public static Sheets GetAllWorksheets(string fileName) ``` + ```vb Public Function GetAllWorksheets(ByVal fileName As String) As Sheets ``` + The method works with the workbook you specify, returning an instance of the WorkbookPart. // Code removed here. } ``` + ```vb Using document As SpreadsheetDocument = SpreadsheetDocument.Open(fileName, False) @@ -138,6 +144,7 @@ class="nolink">WorkbookPart. ' Code removed here. End Using ``` + To get access to the Workbook object, the code retrieves the @@ -158,6 +165,7 @@ return value. ```csharp theSheets = wbPart.Workbook.Sheets; ``` + ```vb theSheets = wbPart.Workbook.Sheets ``` @@ -208,6 +216,7 @@ Basic. } } ``` + ```vb Imports DocumentFormat.OpenXml.Packaging Imports DocumentFormat.OpenXml.Spreadsheet @@ -246,5 +255,4 @@ Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-retrieve-application-property-values-from-a-word-processing-document.md b/docs/how-to-retrieve-application-property-values-from-a-word-processing-document.md index 7a3299b..b79e906 100644 --- a/docs/how-to-retrieve-application-property-values-from-a-word-processing-document.md +++ b/docs/how-to-retrieve-application-property-values-from-a-word-processing-document.md @@ -20,8 +20,7 @@ Office to programmatically retrieve an application property from a Microsoft Word 2013 document, without loading the document into Word. It contains example code to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -36,6 +35,7 @@ the code in this topic. using System; using DocumentFormat.OpenXml.Packaging; ``` + ```vb Imports DocumentFormat.OpenXml.Packaging ``` @@ -62,6 +62,7 @@ code. // Code removed here… } ``` + ```vb Private Const FILENAME As String = "DocumentProperties.docx" @@ -70,6 +71,7 @@ code. ' Code removed here… End Using ``` + Given the reference to the WordProcessingDocument object, you can retrieve a reference to the ExtendedFilePropertiesPart, you can then retrieve any of the application properties, using simple code such as that shown @@ -105,6 +109,7 @@ specifically given them a value. if (props.Manager != null) Console.WriteLine("Manager = " + props.Manager.Text); ``` + ```vb If props.Company IsNot Nothing Then Console.WriteLine("Company = " & props.Company.Text) @@ -154,6 +159,7 @@ The following is the complete code sample in C\# and Visual Basic. } } ``` + ```vb Imports DocumentFormat.OpenXml.Packaging @@ -187,5 +193,4 @@ The following is the complete code sample in C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-retrieve-comments-from-a-word-processing-document.md b/docs/how-to-retrieve-comments-from-a-word-processing-document.md index 6baaf23..38051d8 100644 --- a/docs/how-to-retrieve-comments-from-a-word-processing-document.md +++ b/docs/how-to-retrieve-comments-from-a-word-processing-document.md @@ -27,6 +27,7 @@ this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; ``` + ```vb Imports System Imports DocumentFormat.OpenXml.Packaging @@ -55,6 +56,7 @@ the Boolean parameter to **false**. // Insert other code here. } ``` + ```vb Using wordDoc As WordprocessingDocument = WordprocessingDocument.Open(fileName, False) ' Insert other code here. @@ -98,6 +100,7 @@ introduces the comments element. ``` + > © ISO/IEC29500: 2008. The following XML schema segment defines the contents of the comments @@ -174,6 +177,7 @@ element. Console.WriteLine(comment.InnerText); } ``` + ```vb For Each comment As Comment In _ commentsPart.Comments.Elements(Of Comment)() @@ -193,10 +197,12 @@ example. string fileName = @"C:\Users\Public\Documents\Word16.docx"; GetCommentsFromDocument(fileName); ``` + ```vb Dim fileName As String = "C:\Users\Public\Documents\Word16.docx" GetCommentsFromDocument(fileName) ``` + The following is the complete sample code in both C\# and Visual Basic. ```csharp @@ -218,6 +224,7 @@ The following is the complete sample code in both C\# and Visual Basic. } } ``` + ```vb Public Sub GetCommentsFromDocument(ByVal fileName As String) Using wordDoc As WordprocessingDocument = _ @@ -241,5 +248,4 @@ The following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-retrieve-the-number-of-slides-in-a-presentation-document.md b/docs/how-to-retrieve-the-number-of-slides-in-a-presentation-document.md index 84138f3..ff3a578 100644 --- a/docs/how-to-retrieve-the-number-of-slides-in-a-presentation-document.md +++ b/docs/how-to-retrieve-the-number-of-slides-in-a-presentation-document.md @@ -22,8 +22,7 @@ loading the document into Microsoft PowerPoint. It contains an example **RetrieveNumberOfSlides** method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -39,6 +38,7 @@ the code in this topic. using System.Linq; using DocumentFormat.OpenXml.Packaging; ``` + ```vb Imports DocumentFormat.OpenXml.Packaging ``` @@ -57,6 +57,7 @@ include hidden slides in the count. public static int RetrieveNumberOfSlides(string fileName, bool includeHidden = true) ``` + ```vb Public Function RetrieveNumberOfSlides(ByVal fileName As String, Optional ByVal includeHidden As Boolean = True) As Integer @@ -75,6 +76,7 @@ values, as shown in the following code. // Retrieve the number of slides, including the hidden slides. Console.WriteLine(RetrieveNumberOfSlides(DEMOPATH)); ``` + ```vb ' Retrieve the number of slides, excluding the hidden slides. Console.WriteLine(RetrieveNumberOfSlides(DEMOPATH, False)) @@ -107,6 +109,7 @@ the main presentation part, storing the reference in a variable named } Return slidesCount; ``` + ```vb Using doc As PresentationDocument = PresentationDocument.Open(fileName, False) @@ -139,6 +142,7 @@ exclude hidden slides, as shown in the following code. // Code removed here… } ``` + ```vb If includeHidden Then slidesCount = presentationPart.SlideParts.Count() @@ -172,6 +176,7 @@ function with a lambda expression to do the work. s.Slide.Show.Value))); slidesCount = slides.Count(); ``` + ```vb Dim slides = presentationPart.SlideParts. Where(Function(s) (s.Slide IsNot Nothing) AndAlso @@ -220,6 +225,7 @@ Visual Basic. return slidesCount; } ``` + ```vb Public Function RetrieveNumberOfSlides(ByVal fileName As String, Optional ByVal includeHidden As Boolean = True) As Integer @@ -253,5 +259,4 @@ Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-retrieve-the-values-of-cells-in-a-spreadsheet.md b/docs/how-to-retrieve-the-values-of-cells-in-a-spreadsheet.md index 20306ae..6091319 100644 --- a/docs/how-to-retrieve-the-values-of-cells-in-a-spreadsheet.md +++ b/docs/how-to-retrieve-the-values-of-cells-in-a-spreadsheet.md @@ -20,8 +20,7 @@ Office to programmatically retrieve the values of cells in a spreadsheet document. It contains an example **GetCellValue** method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -36,6 +35,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; ``` + ```vb Imports DocumentFormat.OpenXml.Packaging Imports DocumentFormat.OpenXml.Spreadsheet @@ -62,6 +62,7 @@ found. The following code example shows the method signature. string sheetName, string addressName) ``` + ```vb Public Function GetCellValue(ByVal fileName As String, ByVal sheetName As String, @@ -86,6 +87,7 @@ example. Console.WriteLine( DateTime.FromOADate(double.Parse(value)).ToShortDateString()); ``` + ```vb Const fileName As String = "C:\Users\Public\Documents\RetrieveCellValue.xlsx" @@ -108,6 +110,7 @@ initializes it to null. ```csharp string value = null; ``` + ```vb Dim value as String = Nothing ``` @@ -131,6 +134,7 @@ class="nolink">WorkbookPart property of the document. // Retrieve a reference to the workbook part. WorkbookPart wbPart = document.WorkbookPart; ``` + ```vb ' Open the spreadsheet document for read-only access. Using document As SpreadsheetDocument = @@ -139,6 +143,7 @@ class="nolink">WorkbookPart property of the document. ' Retrieve a reference to the workbook part. Dim wbPart As WorkbookPart = document.WorkbookPart ``` + To find the requested cell, the code must first retrieve a reference to the sheet, given its name. The code must search all the sheet-type descendants of the workbook part workbook element and examine the GetPartById method. WorksheetPart wsPart = (WorksheetPart)(wbPart.GetPartById(theSheet.Id)); ``` + ```vb ' Retrieve a reference to the worksheet part. Dim wsPart As WorksheetPart = CType(wbPart.GetPartById(theSheet.Id), WorksheetPart) ``` + Just as when locating the named sheet, when locating the named cell, the code uses the (). Where(c => c.CellReference == addressName).FirstOrDefault(); ``` + ```vb ' Use its Worksheet property to get a reference to the cell ' whose address matches the address you supplied. @@ -244,6 +254,7 @@ such as the following. 12.345000000000001 ``` + The InnerText property contains the content for @@ -257,6 +268,7 @@ the cell, and so the next block of code retrieves this value. // Code removed here… } ``` + ```vb ' If the cell does not exist, return an empty string. If theCell IsNot Nothing Then @@ -264,6 +276,7 @@ the cell, and so the next block of code retrieves this value. ' Code removed here… End If ``` + Now, the sample method must interpret the value. As it is, the code handles numeric and date, string, and Boolean values. You can extend the sample as necessary. The CellValues.SharedString, the code must retrieve a reference to the single SharedStringTablePart. wbPart.GetPartsOfType() .FirstOrDefault(); ``` + ```vb ' For shared strings, look up the value in the ' shared strings table. Dim stringTable = wbPart. GetPartsOfType(Of SharedStringTablePart).FirstOrDefault() ``` + Next, if the string table exists (and if it does not, the workbook is damaged and the sample code returns the index into the string table instead of the string itself) the code returns the CellValues.Boolean, the code converts the 0 or 1 it finds in the cell value into the appropriate text string. @@ -373,6 +392,7 @@ it finds in the cell value into the appropriate text string. break; } ``` + ```vb Case CellValues.Boolean Select Case value @@ -382,6 +402,7 @@ it finds in the cell value into the appropriate text string. value = "TRUE" End Select ``` + Finally, the procedure returns the variable value, which contains the requested information. @@ -481,6 +502,7 @@ code sample in C\# and Visual Basic. return value; } ``` + ```vb Public Function GetCellValue(ByVal fileName As String, ByVal sheetName As String, @@ -562,5 +584,4 @@ code sample in C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-search-and-replace-text-in-a-document-part.md b/docs/how-to-search-and-replace-text-in-a-document-part.md index e03e8e3..4a8f3fc 100644 --- a/docs/how-to-search-and-replace-text-in-a-document-part.md +++ b/docs/how-to-search-and-replace-text-in-a-document-part.md @@ -27,6 +27,7 @@ this topic. using System.Text.RegularExpressions; using DocumentFormat.OpenXml.Packaging; ``` + ```vb Imports System.IO Imports System.Text.RegularExpressions @@ -68,11 +69,13 @@ to **true** to enable editing the document. // Insert other code here. } ``` + ```vb Using wordDoc As WordprocessingDocument = WordprocessingDocument.Open(document, True) ' Insert other code here. End Using ``` + The **using** statement provides a recommended alternative to the typical .Open, .Save, .Close sequence. It ensures that the **Dispose** method (internal method @@ -101,6 +104,7 @@ class="keyword">StreamReader object. docText = sr.ReadToEnd(); } ``` + ```vb Dim sr As StreamReader = New StreamReader(wordDoc.MainDocumentPart.GetStream) @@ -108,6 +112,7 @@ class="keyword">StreamReader object. docText = sr.ReadToEnd End using ``` + The code then creates a regular expression object that contains the string "Hello world!" It then replaces the text value with the text "Hi Everyone!." For more information about regular expressions, see [Regular @@ -117,6 +122,7 @@ Expressions](http://msdn.microsoft.com/en-us/library/hs600312.aspx) Regex regexText = new Regex("Hello world!"); docText = regexText.Replace(docText, "Hi Everyone!"); ``` + ```vb Dim regexText As Regex = New Regex("Hello world!") docText = regexText.Replace(docText, "Hi Everyone!") @@ -140,9 +146,11 @@ example. ```csharp SearchAndReplace(@"C:\Users\Public\Documents\MyPkg8.docx"); ``` + ```vb SearchAndReplace("C:\Users\Public\Documents\MyPkg8.docx") ``` + After running the program, you can inspect the file to see the change in the text, "Hello world!" @@ -170,6 +178,7 @@ The following is the complete sample code in both C\# and Visual Basic. } } ``` + ```vb ' To search and replace content in a document part. Public Sub SearchAndReplace(ByVal document As String) @@ -197,8 +206,6 @@ The following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) -[Regular -Expressions](http://msdn.microsoft.com/en-us/library/hs600312.aspx) +[Regular Expressions](http://msdn.microsoft.com/en-us/library/hs600312.aspx) diff --git a/docs/how-to-set-a-custom-property-in-a-word-processing-document.md b/docs/how-to-set-a-custom-property-in-a-word-processing-document.md index 55a31e0..dc308cc 100644 --- a/docs/how-to-set-a-custom-property-in-a-word-processing-document.md +++ b/docs/how-to-set-a-custom-property-in-a-word-processing-document.md @@ -4,7 +4,7 @@ api_name: - Microsoft.Office.DocumentFormat.OpenXML.Packaging api_type: - schema -ms.assetid: 30dfce05-00c1-423e-b4b4-149329fdf184 +ms.assetid: how-to-set-a-custom-property-in-a-word-processing-document title: 'How to: Set a custom property in a word processing document (Open XML SDK)' ms.suite: office ms.technology: open-xml @@ -20,8 +20,7 @@ Office to programmatically set a custom property in a word processing document. It contains an example **SetCustomProperty** method to illustrate this task. -To use the sample code in this topic, you must install the [Open XML SDK -2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You +To use the sample code in this topic, you must install the [Open XML SDK 2.5](http://www.microsoft.com/en-us/download/details.aspx?id=30425). You must explicitly reference the following assemblies in your project: - WindowsBase @@ -40,6 +39,7 @@ the code in this topic. using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.VariantTypes; ``` + ```vb Imports System.IO Imports DocumentFormat.OpenXml.CustomProperties @@ -61,6 +61,7 @@ one of these values when you call the method. NumberDouble } ``` + ```vb Public Enum PropertyTypes YesNo @@ -78,8 +79,7 @@ processing document. You can use the Productivity Tool for Microsoft Office, shown in Figure 1, to discover how they are stored. This tool enables you to open a document and view its parts and the hierarchy of parts. Figure 1 shows a test document after you run the code in the -[Calling the SetCustomProperty -Method](30dfce05-00c1-423e-b4b4-149329fdf184.md#Calling) section of +[Calling the SetCustomProperty Method](how-to-set-a-custom-property-in-a-word-processing-document.md#Calling) section of this article. The tool displays in the right-hand panes both the XML for the part and the reflected C\# code that you can use to generate the contents of the part. @@ -87,8 +87,7 @@ contents of the part. Figure 1. Open XML SDK Productivity Tool for Microsoft Office - ![Open XML SDK 2.0 Productivity -Tool](./media/OpenXmlCon_HowToSetCustomProperty_Fig1.gif) + ![Open XML SDK 2.0 Productivity Tool](./media/OpenXmlCon_HowToSetCustomProperty_Fig1.gif) The relevant XML is also extracted and shown here for ease of reading. @@ -102,6 +101,7 @@ The relevant XML is also extracted and shown here for ease of reading. ``` + If you examine the XML content, you will find the following: - Each property in the XML content consists of an XML element that @@ -126,7 +126,7 @@ The sample method that is provided here includes the code that is required to create or modify a custom document property in a Microsoft Word 2010 or Microsoft Word 2013 document. You can find the complete code listing for the method in the [Sample -Code](30dfce05-00c1-423e-b4b4-149329fdf184.md#SampleCode) section. +Code](how-to-set-a-custom-property-in-a-word-processing-document.md#SampleCode) section. --------------------------------------------------------------------------------- @@ -151,6 +151,7 @@ class="keyword">SetCustomProperty method accepts four parameters: object propertyValue, PropertyTypes propertyType) ``` + ```vb Public Function SetCustomProperty( _ ByVal fileName As String, @@ -180,6 +181,7 @@ shows an example. SetCustomProperty(fileName, "ReviewDate", DateTime.Parse("12/21/2010"), PropertyTypes.DateTime)); ``` + ```vb Const fileName As String = "C:\Users\Public\Documents\SetCustomProperty.docx" @@ -211,8 +213,7 @@ shown in Figure 2. Figure 2. Custom Properties in the Advanced Properties dialog box - ![Advanced Properties dialog with custom -properties](./media/OpenXmlCon_HowToSetCustomPropertyFig2.gif) + ![Advanced Properties dialog with custom properties](./media/OpenXmlCon_HowToSetCustomPropertyFig2.gif) -------------------------------------------------------------------------------- @@ -229,7 +230,7 @@ type of the property value, and then converts the input to the correct type, setting the appropriate property of the CustomDocumentProperty object. -> ![](./media/alert_note.gif)**Note** +> [!NOTE] > The **CustomDocumentProperty** type works much like a VBA Variant type. It maintains separate placeholders as properties for the various types of data it might contain. ```csharp @@ -299,6 +300,7 @@ class="keyword">CustomDocumentProperty object. throw new InvalidDataException("propertyValue"); } ``` + ```vb Dim returnValue As String = Nothing @@ -364,6 +366,7 @@ class="nolink">Name properties of the new custom property. newProp.FormatId = "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"; newProp.Name = propertyName; ``` + ```vb ' Now that you have handled the parameters, start ' working on the document. @@ -395,6 +398,7 @@ document. // Code removed here... } ``` + ```vb Using document = WordprocessingDocument.Open(fileName, True) Dim customProps = document.CustomFilePropertiesPart @@ -414,6 +418,7 @@ and adds a new set of properties to the part. new DocumentFormat.OpenXml.CustomProperties.Properties(); } ``` + ```vb If customProps Is Nothing Then ' No custom properties? Add the part, and the @@ -439,6 +444,7 @@ cannot continue. // Code removed here... } ``` + ```vb Dim props = customProps.Properties If props IsNot Nothing Then @@ -469,6 +475,7 @@ find the first match for the property name. prop.Remove(); } ``` + ```vb Dim prop = props. Where(Function(p) CType(p, CustomDocumentProperty). @@ -505,6 +512,7 @@ the following steps: } props.Save(); ``` + ```vb ' Append the new property, and ' fix up all the property ID values. @@ -517,11 +525,13 @@ the following steps: Next props.Save() ``` + Finally, the code returns the stored original property value. ```csharp return returnValue; ``` + ```vb Return returnValue ``` @@ -669,6 +679,7 @@ Basic. return returnValue; } ``` + ```vb Public Enum PropertyTypes YesNo @@ -790,5 +801,4 @@ Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/how-to-set-the-font-for-a-text-run.md b/docs/how-to-set-the-font-for-a-text-run.md index 91c102d..3f6db62 100644 --- a/docs/how-to-set-the-font-for-a-text-run.md +++ b/docs/how-to-set-the-font-for-a-text-run.md @@ -22,28 +22,17 @@ document programmatically. The following assembly directives are required to compile the code in this topic. - -  - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```csharp using System.Linq; using DocumentFormat.OpenXml.Wordprocessing; using DocumentFormat.OpenXml.Packaging; +``` - -  - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```vb Imports System.Linq Imports DocumentFormat.OpenXml.Wordprocessing Imports DocumentFormat.OpenXml.Packaging - +``` -------------------------------------------------------------------------------- @@ -80,6 +69,7 @@ opened in read/write mode. // Insert other code here. } ``` + ```vb ' Open a Wordprocessing document for editing. Dim package As WordprocessingDocument = WordprocessingDocument.Open(fileName, True) @@ -87,6 +77,7 @@ opened in read/write mode. ' Insert other code here. End Using ``` + The **using** statement provides a recommended alternative to the typical .Create, .Save, .Close sequence. It ensures that the **Dispose** method (internal method @@ -144,6 +135,7 @@ This content may be expressed in a single WordprocessingML run: English العربية ``` + Although it is in the same run, the contents are in different font faces by specifying a different font for ASCII and CS characters in the run: @@ -155,6 +147,7 @@ by specifying a different font for ASCII and CS characters in the run: English العربية ``` + This text run shall therefore use the Courier New font for all characters in the ASCII range, and shall use the Times New Roman font for all characters in the Complex Script range. @@ -186,10 +179,12 @@ class="keyword">Ascii value to "Arial". Ascii = "Arial" }); ``` + ```vb ' Use an object initializer for RunProperties and rPr. Dim rPr As New RunProperties(New RunFonts() With {.Ascii = "Arial"}) ``` + The code then creates a Run object that represents the first text @@ -224,6 +219,7 @@ in the Wordprocessing package). // Save changes to the MainDocumentPart part. package.MainDocumentPart.Document.Save(); ``` + ```vb Dim r As Run = package.MainDocumentPart.Document.Descendants(Of Run)().First() r.PrependChild(Of RunProperties)(rPr) @@ -243,14 +239,16 @@ change the font in the file "myPkg9.docx" by using the following call. string fileName = @"C:\Users\Public\Documents\MyPkg9.docx"; SetRunFont(fileName); ``` + ```vb Dim fileName As String = "C:\Users\Public\Documents\MyPkg9.docx" SetRunFont(fileName) ``` + After running the program check your file "MyPkg9.docx" to see the changed font. -> ![](./media/alert_note.gif)**Note** +> [!NOTE] > This code example assumes that the test word processing document (MyPakg9.docx) contains at least one text run. The following is the complete sample code in both C\# and Visual Basic. @@ -278,6 +276,7 @@ The following is the complete sample code in both C\# and Visual Basic. } } ``` + ```vb ' Set the font for a text run. Public Sub SetRunFont(ByVal fileName As String) @@ -300,11 +299,8 @@ The following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) -[Object Initializers: Named and Anonymous -Types](http://msdn.microsoft.com/en-us/library/bb385125.aspx) +[Object Initializers: Named and Anonymous Types](http://msdn.microsoft.com/en-us/library/bb385125.aspx) -[Object and Collection Initializers (C\# Programming -Guide)](http://msdn.microsoft.com/en-us/library/bb384062.aspx) +[Object and Collection Initializers (C\# Programming Guide)](http://msdn.microsoft.com/en-us/library/bb384062.aspx) diff --git a/docs/how-to-validate-a-word-processing-document.md b/docs/how-to-validate-a-word-processing-document.md index 506f5ac..6313192 100644 --- a/docs/how-to-validate-a-word-processing-document.md +++ b/docs/how-to-validate-a-word-processing-document.md @@ -27,6 +27,7 @@ this topic. using DocumentFormat.OpenXml.Validation; using DocumentFormat.OpenXml.Wordprocessing; ``` + ```vb Imports System Imports DocumentFormat.OpenXml.Packaging @@ -69,6 +70,7 @@ following example that validates a file named "Word18.docx.". Console.WriteLine("All done! Press a key."); Console.ReadKey(); ``` + ```vb Dim filepath As String = "C:\Users\Public\Documents\Word18.docx" ValidateWordDocument(filepath) @@ -159,6 +161,7 @@ Following is the complete sample code in both C\# and Visual Basic. } } ``` + ```vb Public Sub ValidateWordDocument(ByVal filepath As String) Using wordprocessingDocument__1 As WordprocessingDocument = WordprocessingDocument.Open(filepath, True) @@ -221,5 +224,4 @@ Following is the complete sample code in both C\# and Visual Basic. #### Other resources -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) diff --git a/docs/introduction-to-markup-compatibility.md b/docs/introduction-to-markup-compatibility.md index c564e71..06a75f5 100644 --- a/docs/introduction-to-markup-compatibility.md +++ b/docs/introduction-to-markup-compatibility.md @@ -35,8 +35,7 @@ understand and support a feature employed in a document produced by Word Open XML anticipates these scenarios. The Office Open XML File Formats specification describes facilities for achieving the above desired -outcomes in [ECMA-376, Second Edition, Part 3 - Markup Compatibility and -Extensibility](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-376,%20Second%20Edition,%20Part%203%20-%20Markup%20Compatibility%20and%20Extensibility.zip). +outcomes in [ECMA-376, Second Edition, Part 3 - Markup Compatibility and Extensibility](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-376,%20Second%20Edition,%20Part%203%20-%20Markup%20Compatibility%20and%20Extensibility.zip). The Open XML SDK 2.5 supports markup compatibility in a way that makes it easy for you to achieve the above desired outcomes for and Office @@ -63,9 +62,7 @@ applications. -------------------------------------------------------------------------------- -Markup compatibility is discussed in [ECMA-376, Second Edition, Part 3 - -Markup Compatibility and -Extensibility](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-376,%20Second%20Edition,%20Part%203%20-%20Markup%20Compatibility%20and%20Extensibility.zip), +Markup compatibility is discussed in [ECMA-376, Second Edition, Part 3 - Markup Compatibility and Extensibility](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-376,%20Second%20Edition,%20Part%203%20-%20Markup%20Compatibility%20and%20Extensibility.zip), which is recommended reading to understand markup compatibility. The specification defines XML attributes to express compatibility rules, and XML elements to specify alternate content. For example, the ![](./media/alert_caution.gif)**Caution note** +> [!WARNING] > Preprocessing affects what gets saved. When you save a file, the only markup that is saved is that which remains after preprocessing. --------------------------------------------------------------------------------- diff --git a/docs/media/CFW.gif b/docs/media/CFW.gif deleted file mode 100644 index 27097e5..0000000 Binary files a/docs/media/CFW.gif and /dev/null differ diff --git a/docs/media/Caution.gif b/docs/media/Caution.gif deleted file mode 100644 index 0f24145..0000000 Binary files a/docs/media/Caution.gif and /dev/null differ diff --git a/docs/media/GitHub-Mark-64px.png b/docs/media/GitHub-Mark-64px.png deleted file mode 100644 index 182a1a3..0000000 Binary files a/docs/media/GitHub-Mark-64px.png and /dev/null differ diff --git a/docs/media/LastChild.gif b/docs/media/LastChild.gif deleted file mode 100644 index 0b9af7e..0000000 Binary files a/docs/media/LastChild.gif and /dev/null differ diff --git a/docs/media/adm.gif b/docs/media/adm.gif deleted file mode 100644 index 9855be6..0000000 Binary files a/docs/media/adm.gif and /dev/null differ diff --git a/docs/media/adm_arch.gif b/docs/media/adm_arch.gif deleted file mode 100644 index 6308c86..0000000 Binary files a/docs/media/adm_arch.gif and /dev/null differ diff --git a/docs/media/adm_dev.gif b/docs/media/adm_dev.gif deleted file mode 100644 index bb0f95f..0000000 Binary files a/docs/media/adm_dev.gif and /dev/null differ diff --git a/docs/media/adm_dev_arch.gif b/docs/media/adm_dev_arch.gif deleted file mode 100644 index b2c7922..0000000 Binary files a/docs/media/adm_dev_arch.gif and /dev/null differ diff --git a/docs/media/alert_caution.gif b/docs/media/alert_caution.gif deleted file mode 100644 index 331b50b..0000000 Binary files a/docs/media/alert_caution.gif and /dev/null differ diff --git a/docs/media/alert_note.gif b/docs/media/alert_note.gif deleted file mode 100644 index 57bf20c..0000000 Binary files a/docs/media/alert_note.gif and /dev/null differ diff --git a/docs/media/alert_security.gif b/docs/media/alert_security.gif deleted file mode 100644 index e70b29e..0000000 Binary files a/docs/media/alert_security.gif and /dev/null differ diff --git a/docs/media/arch.gif b/docs/media/arch.gif deleted file mode 100644 index 79e25d2..0000000 Binary files a/docs/media/arch.gif and /dev/null differ diff --git a/docs/media/big_adm.gif b/docs/media/big_adm.gif deleted file mode 100644 index 9855be6..0000000 Binary files a/docs/media/big_adm.gif and /dev/null differ diff --git a/docs/media/big_arch.gif b/docs/media/big_arch.gif deleted file mode 100644 index 9f0ae03..0000000 Binary files a/docs/media/big_arch.gif and /dev/null differ diff --git a/docs/media/big_dev.gif b/docs/media/big_dev.gif deleted file mode 100644 index 0a22ad2..0000000 Binary files a/docs/media/big_dev.gif and /dev/null differ diff --git a/docs/media/big_kw.gif b/docs/media/big_kw.gif deleted file mode 100644 index bdbc65a..0000000 Binary files a/docs/media/big_kw.gif and /dev/null differ diff --git a/docs/media/box.gif b/docs/media/box.gif deleted file mode 100644 index a0e0ca9..0000000 Binary files a/docs/media/box.gif and /dev/null differ diff --git a/docs/media/bullet.gif b/docs/media/bullet.gif deleted file mode 100644 index bd7f9d2..0000000 Binary files a/docs/media/bullet.gif and /dev/null differ diff --git a/docs/media/collall.gif b/docs/media/collall.gif deleted file mode 100644 index 66a6f11..0000000 Binary files a/docs/media/collall.gif and /dev/null differ diff --git a/docs/media/collapse.gif b/docs/media/collapse.gif deleted file mode 100644 index d57c046..0000000 Binary files a/docs/media/collapse.gif and /dev/null differ diff --git a/docs/media/collapse_all.gif b/docs/media/collapse_all.gif deleted file mode 100644 index b38b990..0000000 Binary files a/docs/media/collapse_all.gif and /dev/null differ diff --git a/docs/media/copycode.gif b/docs/media/copycode.gif deleted file mode 100644 index 1678162..0000000 Binary files a/docs/media/copycode.gif and /dev/null differ diff --git a/docs/media/copycodeHighlight.gif b/docs/media/copycodeHighlight.gif deleted file mode 100644 index be87230..0000000 Binary files a/docs/media/copycodeHighlight.gif and /dev/null differ diff --git a/docs/media/dev.gif b/docs/media/dev.gif deleted file mode 100644 index 07684fd..0000000 Binary files a/docs/media/dev.gif and /dev/null differ diff --git a/docs/media/dev_arch.gif b/docs/media/dev_arch.gif deleted file mode 100644 index dc74755..0000000 Binary files a/docs/media/dev_arch.gif and /dev/null differ diff --git a/docs/media/dropdown.gif b/docs/media/dropdown.gif deleted file mode 100644 index f5590a0..0000000 Binary files a/docs/media/dropdown.gif and /dev/null differ diff --git a/docs/media/dropdownHover.gif b/docs/media/dropdownHover.gif deleted file mode 100644 index c7061b5..0000000 Binary files a/docs/media/dropdownHover.gif and /dev/null differ diff --git a/docs/media/drpdown.gif b/docs/media/drpdown.gif deleted file mode 100644 index 9d3bbb6..0000000 Binary files a/docs/media/drpdown.gif and /dev/null differ diff --git a/docs/media/drpdown_orange.gif b/docs/media/drpdown_orange.gif deleted file mode 100644 index cf50c20..0000000 Binary files a/docs/media/drpdown_orange.gif and /dev/null differ diff --git a/docs/media/drpdown_orange_up.gif b/docs/media/drpdown_orange_up.gif deleted file mode 100644 index a173df1..0000000 Binary files a/docs/media/drpdown_orange_up.gif and /dev/null differ diff --git a/docs/media/drpup.gif b/docs/media/drpup.gif deleted file mode 100644 index de77198..0000000 Binary files a/docs/media/drpup.gif and /dev/null differ diff --git a/docs/media/exp.gif b/docs/media/exp.gif deleted file mode 100644 index 023b837..0000000 Binary files a/docs/media/exp.gif and /dev/null differ diff --git a/docs/media/expall.gif b/docs/media/expall.gif deleted file mode 100644 index 1a91b12..0000000 Binary files a/docs/media/expall.gif and /dev/null differ diff --git a/docs/media/expand_all.gif b/docs/media/expand_all.gif deleted file mode 100644 index c7061b5..0000000 Binary files a/docs/media/expand_all.gif and /dev/null differ diff --git a/docs/media/filter1a.gif b/docs/media/filter1a.gif deleted file mode 100644 index 8a2f9b5..0000000 Binary files a/docs/media/filter1a.gif and /dev/null differ diff --git a/docs/media/filter1c.gif b/docs/media/filter1c.gif deleted file mode 100644 index 49de223..0000000 Binary files a/docs/media/filter1c.gif and /dev/null differ diff --git a/docs/media/footer.gif b/docs/media/footer.gif deleted file mode 100644 index 16bfa5e..0000000 Binary files a/docs/media/footer.gif and /dev/null differ diff --git a/docs/media/gradient.gif b/docs/media/gradient.gif deleted file mode 100644 index 0179762..0000000 Binary files a/docs/media/gradient.gif and /dev/null differ diff --git a/docs/media/greencheck.gif b/docs/media/greencheck.gif deleted file mode 100644 index 4ba1751..0000000 Binary files a/docs/media/greencheck.gif and /dev/null differ diff --git a/docs/media/greychck.gif b/docs/media/greychck.gif deleted file mode 100644 index adb8fa1..0000000 Binary files a/docs/media/greychck.gif and /dev/null differ diff --git a/docs/media/header_prev_next.jpg b/docs/media/header_prev_next.jpg deleted file mode 100644 index 2f53424..0000000 Binary files a/docs/media/header_prev_next.jpg and /dev/null differ diff --git a/docs/media/header_sql_tutorial_blank.jpg b/docs/media/header_sql_tutorial_blank.jpg deleted file mode 100644 index aca0566..0000000 Binary files a/docs/media/header_sql_tutorial_blank.jpg and /dev/null differ diff --git a/docs/media/header_sql_tutorial_logo.GIF b/docs/media/header_sql_tutorial_logo.GIF deleted file mode 100644 index e0b0bcc..0000000 Binary files a/docs/media/header_sql_tutorial_logo.GIF and /dev/null differ diff --git a/docs/media/kw.gif b/docs/media/kw.gif deleted file mode 100644 index 9f0ae03..0000000 Binary files a/docs/media/kw.gif and /dev/null differ diff --git a/docs/media/kw_adm.gif b/docs/media/kw_adm.gif deleted file mode 100644 index 5114e89..0000000 Binary files a/docs/media/kw_adm.gif and /dev/null differ diff --git a/docs/media/kw_adm_arch.gif b/docs/media/kw_adm_arch.gif deleted file mode 100644 index 9adfaac..0000000 Binary files a/docs/media/kw_adm_arch.gif and /dev/null differ diff --git a/docs/media/kw_adm_dev.gif b/docs/media/kw_adm_dev.gif deleted file mode 100644 index 46f6eea..0000000 Binary files a/docs/media/kw_adm_dev.gif and /dev/null differ diff --git a/docs/media/kw_adm_dev_arch.gif b/docs/media/kw_adm_dev_arch.gif deleted file mode 100644 index 358f2fa..0000000 Binary files a/docs/media/kw_adm_dev_arch.gif and /dev/null differ diff --git a/docs/media/kw_arch.gif b/docs/media/kw_arch.gif deleted file mode 100644 index fec3452..0000000 Binary files a/docs/media/kw_arch.gif and /dev/null differ diff --git a/docs/media/kw_dev.gif b/docs/media/kw_dev.gif deleted file mode 100644 index d9d6f64..0000000 Binary files a/docs/media/kw_dev.gif and /dev/null differ diff --git a/docs/media/kw_dev_arch.gif b/docs/media/kw_dev_arch.gif deleted file mode 100644 index e784bd6..0000000 Binary files a/docs/media/kw_dev_arch.gif and /dev/null differ diff --git a/docs/media/load.gif b/docs/media/load.gif deleted file mode 100644 index 5035e4f..0000000 Binary files a/docs/media/load.gif and /dev/null differ diff --git a/docs/media/load_hover.gif b/docs/media/load_hover.gif deleted file mode 100644 index c7740c1..0000000 Binary files a/docs/media/load_hover.gif and /dev/null differ diff --git a/docs/media/note.gif b/docs/media/note.gif deleted file mode 100644 index 54c6ae6..0000000 Binary files a/docs/media/note.gif and /dev/null differ diff --git a/docs/media/pencil.GIF b/docs/media/pencil.GIF deleted file mode 100644 index 000dcb4..0000000 Binary files a/docs/media/pencil.GIF and /dev/null differ diff --git a/docs/media/privclass.gif b/docs/media/privclass.gif deleted file mode 100644 index 083c534..0000000 Binary files a/docs/media/privclass.gif and /dev/null differ diff --git a/docs/media/privdelegate.gif b/docs/media/privdelegate.gif deleted file mode 100644 index d3aa8a6..0000000 Binary files a/docs/media/privdelegate.gif and /dev/null differ diff --git a/docs/media/privdelicate.gif b/docs/media/privdelicate.gif deleted file mode 100644 index 0abc063..0000000 Binary files a/docs/media/privdelicate.gif and /dev/null differ diff --git a/docs/media/privenum.gif b/docs/media/privenum.gif deleted file mode 100644 index 0db2349..0000000 Binary files a/docs/media/privenum.gif and /dev/null differ diff --git a/docs/media/privenumeration.gif b/docs/media/privenumeration.gif deleted file mode 100644 index 0db2349..0000000 Binary files a/docs/media/privenumeration.gif and /dev/null differ diff --git a/docs/media/privevent.gif b/docs/media/privevent.gif deleted file mode 100644 index 621e71f..0000000 Binary files a/docs/media/privevent.gif and /dev/null differ diff --git a/docs/media/privextension.gif b/docs/media/privextension.gif deleted file mode 100644 index 949ddf0..0000000 Binary files a/docs/media/privextension.gif and /dev/null differ diff --git a/docs/media/privfield.gif b/docs/media/privfield.gif deleted file mode 100644 index 1412052..0000000 Binary files a/docs/media/privfield.gif and /dev/null differ diff --git a/docs/media/privinterface.gif b/docs/media/privinterface.gif deleted file mode 100644 index dddf1a7..0000000 Binary files a/docs/media/privinterface.gif and /dev/null differ diff --git a/docs/media/privmethod.gif b/docs/media/privmethod.gif deleted file mode 100644 index ef9baa4..0000000 Binary files a/docs/media/privmethod.gif and /dev/null differ diff --git a/docs/media/privproperty.gif b/docs/media/privproperty.gif deleted file mode 100644 index 8062b4a..0000000 Binary files a/docs/media/privproperty.gif and /dev/null differ diff --git a/docs/media/privstructure.gif b/docs/media/privstructure.gif deleted file mode 100644 index a2e5f82..0000000 Binary files a/docs/media/privstructure.gif and /dev/null differ diff --git a/docs/media/protclass.gif b/docs/media/protclass.gif deleted file mode 100644 index 0294472..0000000 Binary files a/docs/media/protclass.gif and /dev/null differ diff --git a/docs/media/protdelegate.gif b/docs/media/protdelegate.gif deleted file mode 100644 index 9047a1e..0000000 Binary files a/docs/media/protdelegate.gif and /dev/null differ diff --git a/docs/media/protdeligate.gif b/docs/media/protdeligate.gif deleted file mode 100644 index 9047a1e..0000000 Binary files a/docs/media/protdeligate.gif and /dev/null differ diff --git a/docs/media/protenum.gif b/docs/media/protenum.gif deleted file mode 100644 index 9ba37e3..0000000 Binary files a/docs/media/protenum.gif and /dev/null differ diff --git a/docs/media/protenumeration.gif b/docs/media/protenumeration.gif deleted file mode 100644 index cc96bb6..0000000 Binary files a/docs/media/protenumeration.gif and /dev/null differ diff --git a/docs/media/protevent.gif b/docs/media/protevent.gif deleted file mode 100644 index 061d0f8..0000000 Binary files a/docs/media/protevent.gif and /dev/null differ diff --git a/docs/media/protextension.gif b/docs/media/protextension.gif deleted file mode 100644 index 38199be..0000000 Binary files a/docs/media/protextension.gif and /dev/null differ diff --git a/docs/media/protfield.gif b/docs/media/protfield.gif deleted file mode 100644 index 3dd0310..0000000 Binary files a/docs/media/protfield.gif and /dev/null differ diff --git a/docs/media/protinterface.gif b/docs/media/protinterface.gif deleted file mode 100644 index 522e795..0000000 Binary files a/docs/media/protinterface.gif and /dev/null differ diff --git a/docs/media/protmethod.gif b/docs/media/protmethod.gif deleted file mode 100644 index 2b34672..0000000 Binary files a/docs/media/protmethod.gif and /dev/null differ diff --git a/docs/media/protoperator.gif b/docs/media/protoperator.gif deleted file mode 100644 index cd9e638..0000000 Binary files a/docs/media/protoperator.gif and /dev/null differ diff --git a/docs/media/protproperty.gif b/docs/media/protproperty.gif deleted file mode 100644 index 0f41ac3..0000000 Binary files a/docs/media/protproperty.gif and /dev/null differ diff --git a/docs/media/protstructure.gif b/docs/media/protstructure.gif deleted file mode 100644 index af356a1..0000000 Binary files a/docs/media/protstructure.gif and /dev/null differ diff --git a/docs/media/pubclass.gif b/docs/media/pubclass.gif deleted file mode 100644 index dac8a76..0000000 Binary files a/docs/media/pubclass.gif and /dev/null differ diff --git a/docs/media/pubdelegate.gif b/docs/media/pubdelegate.gif deleted file mode 100644 index e336e5c..0000000 Binary files a/docs/media/pubdelegate.gif and /dev/null differ diff --git a/docs/media/pubenum.gif b/docs/media/pubenum.gif deleted file mode 100644 index a6cb355..0000000 Binary files a/docs/media/pubenum.gif and /dev/null differ diff --git a/docs/media/pubenumeration.gif b/docs/media/pubenumeration.gif deleted file mode 100644 index a6cb355..0000000 Binary files a/docs/media/pubenumeration.gif and /dev/null differ diff --git a/docs/media/pubevent.gif b/docs/media/pubevent.gif deleted file mode 100644 index cc77aa8..0000000 Binary files a/docs/media/pubevent.gif and /dev/null differ diff --git a/docs/media/pubextension.gif b/docs/media/pubextension.gif deleted file mode 100644 index b7e83d8..0000000 Binary files a/docs/media/pubextension.gif and /dev/null differ diff --git a/docs/media/pubfield.gif b/docs/media/pubfield.gif deleted file mode 100644 index 590fbfc..0000000 Binary files a/docs/media/pubfield.gif and /dev/null differ diff --git a/docs/media/pubinterface.gif b/docs/media/pubinterface.gif deleted file mode 100644 index 1a00384..0000000 Binary files a/docs/media/pubinterface.gif and /dev/null differ diff --git a/docs/media/pubmethod.gif b/docs/media/pubmethod.gif deleted file mode 100644 index 4e61c9f..0000000 Binary files a/docs/media/pubmethod.gif and /dev/null differ diff --git a/docs/media/puboperator.gif b/docs/media/puboperator.gif deleted file mode 100644 index ebc8d6a..0000000 Binary files a/docs/media/puboperator.gif and /dev/null differ diff --git a/docs/media/pubproperty.gif b/docs/media/pubproperty.gif deleted file mode 100644 index 074b71a..0000000 Binary files a/docs/media/pubproperty.gif and /dev/null differ diff --git a/docs/media/pubstructure.gif b/docs/media/pubstructure.gif deleted file mode 100644 index 6210d36..0000000 Binary files a/docs/media/pubstructure.gif and /dev/null differ diff --git a/docs/media/requirements1a.gif b/docs/media/requirements1a.gif deleted file mode 100644 index 3b08793..0000000 Binary files a/docs/media/requirements1a.gif and /dev/null differ diff --git a/docs/media/requirements1c.gif b/docs/media/requirements1c.gif deleted file mode 100644 index d62bda3..0000000 Binary files a/docs/media/requirements1c.gif and /dev/null differ diff --git a/docs/media/save.gif b/docs/media/save.gif deleted file mode 100644 index 0c82243..0000000 Binary files a/docs/media/save.gif and /dev/null differ diff --git a/docs/media/save_hover.gif b/docs/media/save_hover.gif deleted file mode 100644 index 7b62e92..0000000 Binary files a/docs/media/save_hover.gif and /dev/null differ diff --git a/docs/media/security.gif b/docs/media/security.gif deleted file mode 100644 index b663dbe..0000000 Binary files a/docs/media/security.gif and /dev/null differ diff --git a/docs/media/seealso1a.gif b/docs/media/seealso1a.gif deleted file mode 100644 index 7a01e1d..0000000 Binary files a/docs/media/seealso1a.gif and /dev/null differ diff --git a/docs/media/seealso1c.gif b/docs/media/seealso1c.gif deleted file mode 100644 index 84f79e7..0000000 Binary files a/docs/media/seealso1c.gif and /dev/null differ diff --git a/docs/media/static.gif b/docs/media/static.gif deleted file mode 100644 index d330943..0000000 Binary files a/docs/media/static.gif and /dev/null differ diff --git a/docs/media/xna.gif b/docs/media/xna.gif deleted file mode 100644 index 9e6a9d4..0000000 Binary files a/docs/media/xna.gif and /dev/null differ diff --git a/docs/open-xml-sdk-2-5.md b/docs/open-xml-sdk-2-5.md index bc2d1b3..852a476 100644 --- a/docs/open-xml-sdk-2-5.md +++ b/docs/open-xml-sdk-2-5.md @@ -25,10 +25,8 @@ The SDK is built on the **System.IO.Packaging** API and provides strongly-typed classes to manipulate documents that adhere to the Office Open XML File Formats Specification. The Office Open XML File Formats specification is an open, international, -[ECMA-376, Second -Edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm) -and [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ECMA-376, Second Edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm) +and [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) standard. The Open XML file formats are useful for developers because they are an open standard and are based on well-known technologies: ZIP and XML. @@ -44,37 +42,28 @@ Portions of ISO/IEC 29500:20081 are referenced in the SDK. --------------------------------------------------------------------------------- - [Getting started with the Open XML SDK 2.5 for -Office](getting-started.md) +[Getting started with the Open XML SDK 2.5 for Office](getting-started.md) - [Understanding the Open XML file -formats](understanding-the-open-xml-file-formats.md) +[Understanding the Open XML file formats](understanding-the-open-xml-file-formats.md) - [How do I... (Open XML -SDK)](how-do-i.md) +[How do I... (Open XML SDK)](how-do-i.md) -[Open XML SDK 2.5 class library -reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) +[Open XML SDK 2.5 class library reference](http://msdn.microsoft.com/library/36c8a76e-ce1b-5959-7e85-5d77db7f46d6(Office.15).aspx) --------------------------------------------------------------------------------- -- [Open XML SDK 2.5 for Microsoft - Office](http://www.microsoft.com/en-us/download/details.aspx?id=30425) +- [Open XML SDK 2.5 for Microsoft Office](http://www.microsoft.com/en-us/download/details.aspx?id=30425) -- [Microsoft Office Developer - Center](http://msdn.microsoft.com/en-us/office/default.aspx) +- [Microsoft Office Developer Center](http://msdn.microsoft.com/en-us/office/default.aspx) - [Samples on GitHub](https://github.com/OfficeDev) -- [Open XML SDK copyright - notice](http://msdn.microsoft.com/library/6165f4ad-2e4d-4852-921a-087782af364d(Office.15).aspx) +- [Open XML SDK copyright notice](http://msdn.microsoft.com/library/6165f4ad-2e4d-4852-921a-087782af364d(Office.15).aspx) -- [Accessibility Features in the Microsoft Office - System](http://go.microsoft.com/fwlink/?LinkID=35092&clcid=0x409) +- [Accessibility Features in the Microsoft Office System](http://go.microsoft.com/fwlink/?LinkID=35092&clcid=0x409) -- [Document Conventions in Office Developer - Documentation](http://msdn.microsoft.com/en-us/office/aa905365.aspx) +- [Document Conventions in Office Developer Documentation](http://msdn.microsoft.com/en-us/office/aa905365.aspx) 1© ISO/IEC2900:2008. This material is reproduced from ISO/IEC 29500:2008 with permission of the American National Standards Institute diff --git a/docs/packages-and-general.md b/docs/packages-and-general.md index bcf906b..f80c406 100644 --- a/docs/packages-and-general.md +++ b/docs/packages-and-general.md @@ -21,39 +21,25 @@ packages using the Open XML SDK 2.5. -------------------------------------------------------------------------------- - [How to: Add a new document part that receives a -relationship ID to a package (Open XML -SDK)](how-to-add-a-new-document-part-that-receives-a-relationship-id-to-a-package.md) +[How to: Add a new document part that receives a relationship ID to a package (Open XML SDK)](how-to-add-a-new-document-part-that-receives-a-relationship-id-to-a-package.md) - [How to: Add a new document part to a package (Open -XML SDK)](how-to-add-a-new-document-part-to-a-package.md) +[How to: Add a new document part to a package (Open XML SDK)](how-to-add-a-new-document-part-to-a-package.md) - [How to: Copy the contents of an Open XML package -part to a document part in a different package (Open XML -SDK)](how-to-copy-the-contents-of-an-open-xml-package-part-to-a-document-part-in-a-dif.md) +[How to: Copy the contents of an Open XML package part to a document part in a different package (Open XML SDK)](how-to-copy-the-contents-of-an-open-xml-package-part-to-a-document-part-in-a-dif.md) - [How to: Create a package (Open XML -SDK)](how-to-create-a-package.md) +[How to: Create a package (Open XML SDK)](how-to-create-a-package.md) - [How to: Get the contents of a document part from a -package (Open XML SDK)](how-to-get-the-contents-of-a-document-part-from-a-package.md) - +[How to: Get the contents of a document part from a package (Open XML SDK)](how-to-get-the-contents-of-a-document-part-from-a-package.md) - [How to: Remove a document part from a package (Open -XML SDK)](how-to-remove-a-document-part-from-a-package.md) +[How to: Remove a document part from a package (Open XML SDK)](how-to-remove-a-document-part-from-a-package.md) - [How to: Replace the theme part in a word processing -document (Open XML SDK)](how-to-replace-the-theme-part-in-a-word-processing-document.md) - +[How to: Replace the theme part in a word processing document (Open XML SDK)](how-to-replace-the-theme-part-in-a-word-processing-document.md) - [How to: Search and replace text in a document part -(Open XML SDK)](how-to-search-and-replace-text-in-a-document-part.md) +[How to: Search and replace text in a document part (Open XML SDK)](how-to-search-and-replace-text-in-a-document-part.md) -------------------------------------------------------------------------------- - [How do I... (Open XML -SDK)](how-do-i.md) +[How do I... (Open XML SDK)](how-do-i.md) - [Getting started with the Open XML SDK 2.5 for -Office](getting-started.md) +[Getting started with the Open XML SDK 2.5 for Office](getting-started.md) diff --git a/docs/presentations.md b/docs/presentations.md index 9e7dce9..fc4780f 100644 --- a/docs/presentations.md +++ b/docs/presentations.md @@ -21,66 +21,39 @@ documents using the Open XML SDK 2.5. -------------------------------------------------------------------------------- - [How to: Add a comment to a slide in a presentation -(Open XML SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.htm) +[How to: Add a comment to a slide in a presentation (Open XML SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) - [How to: Change the fill color of a shape in a -presentation (Open XML SDK)](how-to-change-the-fill-color-of-a-shape-in-a-presentation.htm) - +[How to: Change the fill color of a shape in a presentation (Open XML SDK)](how-to-change-the-fill-color-of-a-shape-in-a-presentation.md) - [How to: Create a presentation document by providing -a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) - +[How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Delete all the comments by an author from -all the slides in a presentation (Open XML -SDK)](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.htm) +[How to: Delete all the comments by an author from all the slides in a presentation (Open XML SDK)](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) - [How to: Get all the external hyperlinks in a -presentation (Open XML SDK)](how-to-get-all-the-external-hyperlinks-in-a-presentation.htm) - +[How to: Get all the external hyperlinks in a presentation (Open XML SDK)](how-to-get-all-the-external-hyperlinks-in-a-presentation.md) - [How to: Get all the text in a slide in a -presentation (Open XML SDK)](how-to-get-all-the-text-in-a-slide-in-a-presentation.htm) - +[How to: Get all the text in a slide in a presentation (Open XML SDK)](how-to-get-all-the-text-in-a-slide-in-a-presentation.md) - [How to: Get all the text in all slides in a -presentation (Open XML SDK)](how-to-get-all-the-text-in-all-slides-in-a-presentation.htm) - +[How to: Get all the text in all slides in a presentation (Open XML SDK)](how-to-get-all-the-text-in-all-slides-in-a-presentation.md) - [How to: Get the titles of all the slides in a -presentation (Open XML SDK)](how-to-get-the-titles-of-all-the-slides-in-a-presentation.htm) - +[How to: Get the titles of all the slides in a presentation (Open XML SDK)](how-to-get-the-titles-of-all-the-slides-in-a-presentation.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Move a slide to a new position in a -presentation (Open XML SDK)](how-to-move-a-slide-to-a-new-position-in-a-presentation.htm) - +[How to: Move a slide to a new position in a presentation (Open XML SDK)](how-to-move-a-slide-to-a-new-position-in-a-presentation.md) - [How to: Move a paragraph from one presentation to -another (Open XML SDK)](how-to-move-a-paragraph-from-one-presentation-to-another.htm) - +[How to: Move a paragraph from one presentation to another (Open XML SDK)](how-to-move-a-paragraph-from-one-presentation-to-another.md) - [How to: Open a presentation document for read-only -access (Open XML SDK)](how-to-open-a-presentation-document-for-read-only-access.htm) +[How to: Open a presentation document for read-only access (Open XML SDK)](how-to-open-a-presentation-document-for-read-only-access.md) - [How to: Retrieve the number of slides in a -presentation document (Open XML -SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.htm) +[How to: Retrieve the number of slides in a presentation document (Open XML SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.md) -------------------------------------------------------------------------------- - [How do I... (Open XML -SDK)](how-do-i.htm) +[How do I... (Open XML SDK)](how-do-i.md) - [Getting started with the Open XML SDK 2.5 for -Office](getting-started.htm) +[Getting started with the Open XML SDK 2.5 for Office](getting-started.md) diff --git a/docs/spreadsheets.md b/docs/spreadsheets.md index d23c2b4..ccff74a 100644 --- a/docs/spreadsheets.md +++ b/docs/spreadsheets.md @@ -21,71 +21,41 @@ documents using the Open XML SDK 2.5 for Office. -------------------------------------------------------------------------------- - [How to: Calculate the sum of a range of cells in a -spreadsheet document (Open XML -SDK)](how-to-calculate-the-sum-of-a-range-of-cells-in-a-spreadsheet-document.htm) +[How to: Calculate the sum of a range of cells in a spreadsheet document (Open XML SDK)](how-to-calculate-the-sum-of-a-range-of-cells-in-a-spreadsheet-document.md) - [How to: Create a spreadsheet document by providing -a file name (Open XML SDK)](how-to-create-a-spreadsheet-document-by-providing-a-file-name.htm) - +[How to: Create a spreadsheet document by providing a file name (Open XML SDK)](how-to-create-a-spreadsheet-document-by-providing-a-file-name.md) - [How to: Delete text from a cell in a spreadsheet -document (Open XML SDK)](how-to-delete-text-from-a-cell-in-a-spreadsheet.htm) - +[How to: Delete text from a cell in a spreadsheet document (Open XML SDK)](how-to-delete-text-from-a-cell-in-a-spreadsheet.md) - [How to: Get a column heading in a spreadsheet -document (Open XML SDK)](how-to-get-a-column-heading-in-a-spreadsheet.htm) - +[How to: Get a column heading in a spreadsheet document (Open XML SDK)](how-to-get-a-column-heading-in-a-spreadsheet.md) - [How to: Get worksheet information from an Open XML -package (Open XML SDK)](how-to-get-worksheet-information-from-a-package.htm) - +[How to: Get worksheet information from an Open XML package (Open XML SDK)](how-to-get-worksheet-information-from-a-package.md) - [How to: Insert a chart into a spreadsheet document -(Open XML SDK)](how-to-insert-a-chart-into-a-spreadsheet.htm) +[How to: Insert a chart into a spreadsheet document (Open XML SDK)](how-to-insert-a-chart-into-a-spreadsheet.md) - [How to: Insert a new worksheet into a spreadsheet -document (Open XML SDK)](how-to-insert-a-new-worksheet-into-a-spreadsheet.htm) - +[How to: Insert a new worksheet into a spreadsheet document (Open XML SDK)](how-to-insert-a-new-worksheet-into-a-spreadsheet.md) - [How to: Insert text into a cell in a spreadsheet -document (Open XML SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.htm) - +[How to: Insert text into a cell in a spreadsheet document (Open XML SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.md) - [How to: Merge two adjacent cells in a spreadsheet -document (Open XML SDK)](how-to-merge-two-adjacent-cells-in-a-spreadsheet.htm) - +[How to: Merge two adjacent cells in a spreadsheet document (Open XML SDK)](how-to-merge-two-adjacent-cells-in-a-spreadsheet.md) - [How to: Open a spreadsheet document for read-only -access (Open XML SDK)](how-to-open-a-spreadsheet-document-for-read-only-access.htm) +[How to: Open a spreadsheet document for read-only access (Open XML SDK)](how-to-open-a-spreadsheet-document-for-read-only-access.md) - [How to: Open a spreadsheet document from a stream -(Open XML SDK)](how-to-open-a-spreadsheet-document-from-a-stream.htm) +[How to: Open a spreadsheet document from a stream (Open XML SDK)](how-to-open-a-spreadsheet-document-from-a-stream.md) - [How to: Parse and read a large spreadsheet document -(Open XML SDK)](how-to-parse-and-read-a-large-spreadsheet.htm) +[How to: Parse and read a large spreadsheet document (Open XML SDK)](how-to-parse-and-read-a-large-spreadsheet.md) - [How to: Retrieve a dictionary of all named ranges -in a spreadsheet document (Open XML -SDK)](how-to-retrieve-a-dictionary-of-all-named-ranges-in-a-spreadsheet.htm) +[How to: Retrieve a dictionary of all named ranges in a spreadsheet document (Open XML SDK)](how-to-retrieve-a-dictionary-of-all-named-ranges-in-a-spreadsheet.md) - [How to: Retrieve a list of the hidden rows or -columns in a spreadsheet document (Open XML -SDK)](how-to-retrieve-a-list-of-the-hidden-rows-or-columns-in-a-spreadsheet.htm) +[How to: Retrieve a list of the hidden rows or columns in a spreadsheet document (Open XML SDK)](how-to-retrieve-a-list-of-the-hidden-rows-or-columns-in-a-spreadsheet.md) - [How to: Retrieve a list of the hidden worksheets in -a spreadsheet document (Open XML -SDK)](how-to-retrieve-a-list-of-the-hidden-worksheets-in-a-spreadsheet.htm) +[How to: Retrieve a list of the hidden worksheets in a spreadsheet document (Open XML SDK)](how-to-retrieve-a-list-of-the-hidden-worksheets-in-a-spreadsheet.md) - [How to: Retrieve the values of cells in a -spreadsheet document (Open XML -SDK)](how-to-retrieve-the-values-of-cells-in-a-spreadsheet.htm) +[How to: Retrieve the values of cells in a spreadsheet document (Open XML SDK)](how-to-retrieve-the-values-of-cells-in-a-spreadsheet.md) -------------------------------------------------------------------------------- - [How do I... (Open XML -SDK)](how-do-i.htm) +[How do I... (Open XML SDK)](how-do-i.md) - [Getting started with the Open XML SDK 2.5 for -Office](getting-started.htm) +[Getting started with the Open XML SDK 2.5 for Office](getting-started.md) diff --git a/docs/structure-of-a-presentationml-document.md b/docs/structure-of-a-presentationml-document.md index fd801fd..1e0ac05 100644 --- a/docs/structure-of-a-presentationml-document.md +++ b/docs/structure-of-a-presentationml-document.md @@ -62,8 +62,7 @@ Handout Master||HandoutMaster|The root element of the Handout Mas Comments||CommentList|The root element of the Comments part. This element specifies a list of comments for a particular slide. For more information, see Working with comments (Open XML SDK). Comments Author||CommentAuthorList|The root element of the Comments Author part. This element specifies a list of authors with comments in the current document. For more information, see Working with comments (Open XML SDK). - Descriptions adapted from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) + Descriptions adapted from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification, © ISO/IEC29500: 2008. ### Presentation Part @@ -83,8 +82,7 @@ out to an audience for future reference.) The root element of the Presentation Properties part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Presentation Properties part as follows: @@ -95,30 +93,30 @@ A package shall contain exactly one Presentation Properties part, and that part shall be the target of an implicit relationship from the Presentation (§13.3.6) part. -[Example: The following Presentation part-relationship item contains a +Example: The following Presentation part-relationship item contains a relationship to the Presentation Properties part, which is stored in the ZIP item presProps.xml: -\ -    \ -\ - -end example] +```xml + +     + +``` The root element for a part of this content type shall be presentationPr. -[Example: +Example: -\ -    \ +```xml + +             … -    \ +         … -\ - -end example] + +``` A Presentation Properties part shall be located within the package containing the relationships part (expressed syntactically, the @@ -133,8 +131,7 @@ relationships to any other part defined by ISO/IEC 29500. The root element of the Slide Master part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Slide Master part as follows: @@ -149,30 +146,30 @@ Layout (§13.3.9) part where that slide layout is defined based on this slide master. Each can optionally be the target of a relationship in a Slide Layout (§13.3.9) part as well. -[Example: The following Presentation part-relationship item contains a +Example: The following Presentation part-relationship item contains a relationship to the Slide Master part, which is stored in the ZIP item slideMasters/slideMaster1.xml: -\ -    \ +     -\ - -end example] +Target="slideMasters/slideMaster1.xml"/> + +``` The root element for a part of this content type shall be sldMaster. -[Example: +Example: -\ -    \ +```xml + +             … -    \ -    \ -\ - -end example] +     +     + +``` A Slide Master part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of @@ -212,8 +209,7 @@ any other part defined by ISO/IEC 29500. The root element of the Slide Layout part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Slide Layout part as follows: @@ -227,39 +223,40 @@ those parts shall be the target of an explicit relationship in the Slide Master (§13.3.10) part, as well as an implicit relationship from each of the Slide (§13.3.8) parts associated with this slide layout. -[Example: The following Slide Master part-relationship item contains +Example: The following Slide Master part-relationship item contains relationships to several Slide Layout parts, which are stored in the ZIP items ../slideLayouts/slideLayoutN.xml: -\ -    \ +     -    \ +     -    \ +     -\ +        Target="../slideLayouts/slideLayout3.xml"/> + +``` -end example] The root element for a part of this content type shall be sldLayout. -[Example: +Example: -\ -    \ +```xml + +             … -    \ -    \ -        \ -    \ -    \ -\ - -end example] +     +     +         +     +     + +``` A Slide Layout part is permitted to have implicit relationships to the following parts defined by ISO/IEC 29500: @@ -301,8 +298,7 @@ A comment is an annotation intended for the person maintaining the presentation slide deck. A note is a reminder or piece of text intended for the presenter or the audience. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Slide part as follows: @@ -312,42 +308,42 @@ A package shall contain one Slide part per slide, and each of those parts shall be the target of an explicit relationship from the Presentation (§13.3.6) part. -[Example: Consider a PresentationML document having two slides. The +Example: Consider a PresentationML document having two slides. The corresponding Presentation part relationship item contains two relationships to Slide parts, which are stored in the ZIP items slides/slide1.xml and slides/slide2.xml: -\ -    \ -    \ -\ - -end example] +```xml + +     +     + +``` The root element for a part of this content type shall be sld. -[Example: slides/slide1.xml contains: +Example: slides/slide1.xml contains: -\ -    \ +```xml + +             … -    \ -    \ +     +             … -    \ -    \ -        \ -            \ -                \ -            \ -        \ -    \ -\ - -end example] +     +     +         +             +                 +             +         +     + +``` A Slide part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of @@ -391,8 +387,7 @@ other part defined by ISO/IEC 29500. The root element of the Theme part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML DrawingML Theme part as follows: An instance of this part type contains information about a document's @@ -412,40 +407,40 @@ package shall contain zero or one Theme part per Handout Master (§13.3.3), Notes Master (§13.3.4), Slide Master (§13.3.10) or Presentation (§13.3.6) part via an implicit relationship. -[Example: The following WordprocessingML Main Document part-relationship +Example: The following WordprocessingML Main Document part-relationship item contains a relationship to the Theme part, which is stored in the ZIP item theme/theme1.xml: -\ -    \ -    \ - -end example] +```xml + +     +     +``` The root element for a part of this content type shall be officeStyleSheet. -[Example: theme1.xml contains the following, where the name attributes +Example: theme1.xml contains the following, where the name attributes of the clrScheme, fontScheme, and fmtScheme elements correspond to the document's color scheme, font scheme, and format scheme, respectively: -\ -    \ -        \ +```xml + +     +                     … -        \ -        \ +         +                     … -        \ -        \ +         +                     … -        \ -    \ -    \ -\ - -end example] +         +     +     + +``` A Theme part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of @@ -466,8 +461,7 @@ other parts defined by ISO/IEC 29500. The root element of the Notes Master part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Notes Master part as follows: @@ -479,30 +473,30 @@ shall be the target of an implicit relationship from the Notes Slide (§13.3.5) part, as well as an explicit relationship from the Presentation (§13.3.6) part. -[Example: The following Presentation part-relationship item contains a +Example: The following Presentation part-relationship item contains a relationship to the Notes Master part, which is stored in the ZIP item notesMasters/notesMaster1.xml: -\ -    \ +     -\ - -end example] +Target="notesMasters/notesMaster1.xml"/> + +``` The root element for a part of this content type shall be notesMaster. -[Example: +Example: -\ -    \ +```xml + +             … -    \ -    \ -\ - -end example] +     +     + +``` A Notes Master part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of @@ -541,8 +535,7 @@ to any other part defined by ISO/IEC 29500. The root element of the Notes Slide part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Notes Slide part as follows: @@ -552,32 +545,32 @@ A package shall contain one Notes Slide part for each slide that contains notes. If they exist, those parts shall each be the target of an implicit relationship from the Slide (§13.3.8) part. -[Example: The following Slide part-relationship item contains a +Example: The following Slide part-relationship item contains a relationship to a Notes Slide part, which is stored in the ZIP item ../notesSlides/notesSlide1.xml: -\ -    \ +     -\ - -end example] +Target="../notesSlides/notesSlide1.xml"/> + +``` The root element for a part of this content type shall be notes. -[Example: +Example: -\ -    \ +```xml + +              … -    \ -    \ -        \ -    \ -\ - -end example] +     +     +         +     + +``` A Notes Slide part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of @@ -618,8 +611,7 @@ to any other part defined by ISO/IEC 29500. The root element of the Handout Master part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Handout Master part as follows: @@ -631,30 +623,30 @@ A package shall contain at most one Handout Master part, and it shall be the target of an explicit relationship from the Presentation (§13.3.6) part. -[Example: The following Presentation part-relationship item contains a +Example: The following Presentation part-relationship item contains a relationship to the Handout Master part, which is stored in the ZIP item handoutMasters/handoutMaster1.xml: -\ -    \ +     -\ - -end example] +        Target="handoutMasters/handoutMaster1.xml"/> + +``` The root element for a part of this content type shall be handoutMaster. -[Example: +Example: -\ -    \ +```xml + +             … -    \ -    \ -\ - -end example] +     +     + +``` A Handout Master part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of @@ -693,8 +685,7 @@ to any other part defined by ISO/IEC 29500. The root element of the Comments part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Comments part as follows: @@ -706,41 +697,41 @@ A package shall contain one Comments part for each slide containing one or more comments, and each of those parts shall be the target of an implicit relationship from its corresponding Slide (§13.3.8) part. -[Example: The following Slide part-relationship item contains a +Example: The following Slide part-relationship item contains a relationship to a Comments part, which is stored in the ZIP item ../comments/comment2.xml: -\ -    \ +     -\ - -end example] +        Target="../comments/comment2.xml"/> + +``` The root element for a part of this content type shall be cmLst. -[Example: The Comments part contains three comments, two created by one +Example: The Comments part contains three comments, two created by one author, and one created by another, all at the dates and times shown. The index numbers are assigned on a per-author basis, starting at 1 for an author's first comment: -\ -    \ -        \ -        \Comment text goes here.\ -    \ -    \ -        \ -        \Another comment's text goes here.\ -    \ -    \ -        \ -        \comment …\ -    \ -\ - -end example] +```xml + +     +         +        Comment text goes here. +     +     +         +        Another comment's text goes here. +     +     +         +        comment … +     + +``` A Comments part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of @@ -756,8 +747,7 @@ other part defined by ISO/IEC 29500. The root element of the Comments Author part is the \ element. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML Comments Author part as follows: @@ -771,20 +761,20 @@ A package shall contain at most one Comment Authors part. If it exists, that part shall be the target of an implicit relationship from the Presentation (§13.3.6) part. -[Example: The following Presentation part relationship item contains a +Example: The following Presentation part relationship item contains a relationship to the Comment Authors part, which is stored in the ZIP item commentAuthors.xml: -\ -    \ -\ - -end example] +```xml + +     + +``` The root element for a part of this content type shall be cmAuthorLst. -[Example: Two people have authored comments in this document: Mary Smith +Example: Two people have authored comments in this document: Mary Smith and Peter Jones. Her initials are "mas", her author-ID is 0, and her comments' display color index is 0. Since Mary's last-comment-index-used value is 3, the next comment-index to be used for her is 4. His initials @@ -792,14 +782,14 @@ are "pjj", his author-ID is 1, and his comments' display color index is 1. Since Peter's last-comment-index-used value is 1, the next comment-index to be used for him is 2: -\ -    \ -    \ -\ - -end example] +```xml + +     +     + +``` A Comment Authors part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode @@ -816,8 +806,7 @@ to any other part defined by ISO/IEC 29500. Now that you are familiar with the parts of a PresentationML document, consider how some of these parts are implemented and connected in an actual presentation file. As shown in the article [How to: Create a presentation document by providing a file -name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm), +sdata="link">[How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md), you can use the Open XML API to build up a minimum presentation file, part by part. @@ -849,8 +838,7 @@ single slide. Figure 1. Minimum presentation folder structure - ![Minimum presentation folder -structure](./media/odc_oxml_ppt_documentstructure_fig01.jpg) + ![Minimum presentation folder structure](./media/odc_oxml_ppt_documentstructure_fig01.jpg) The presentation.xml file contains \ (Slide) elements that reference the slides in the presentation. Each slide is associated to the presentation by means of a slide ID and a relationship ID. The slideID is the identifier (ID) used within the package to identify a slide and must be unique within the presentation. The **id** attribute is the relationship ID that identifies the slide part definition associated with a slide. For -more information about the slide part, see [Working -with presentation slides (Open XML -SDK)](working-with-presentation-slides.htm). +more information about the slide part, see [Working with presentation slides (Open XML SDK)](working-with-presentation-slides.md). The following XML code is the PresentationML that represents the presentation part of a presentation document that contains a single @@ -969,26 +955,19 @@ presentation. Figure 2. Elements of a PresentationML file - ![Elements of a PresentationML -file](./media/odc_oxml_ppt_documentstructure_fig02.jpg) + ![Elements of a PresentationML file](./media/odc_oxml_ppt_documentstructure_fig02.jpg) -------------------------------------------------------------------------------- #### Concepts - [How to: Create a presentation document by providing -a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) - +[How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [Working with presentations (Open XML -SDK)](working-with-presentations.htm) +[Working with presentations (Open XML SDK)](working-with-presentations.md) - [Working with presentation slides (Open XML -SDK)](working-with-presentation-slides.htm) +[Working with presentation slides (Open XML SDK)](working-with-presentation-slides.md) - [Working with slide masters (Open XML -SDK)](working-with-slide-masters.htm) +[Working with slide masters (Open XML SDK)](working-with-slide-masters.md) - [Working with slide layouts (Open XML -SDK)](working-with-slide-layouts.htm) +[Working with slide layouts (Open XML SDK)](working-with-slide-layouts.md) diff --git a/docs/structure-of-a-spreadsheetml-document.md b/docs/structure-of-a-spreadsheetml-document.md index d230f04..21f7d2c 100644 --- a/docs/structure-of-a-spreadsheetml-document.md +++ b/docs/structure-of-a-spreadsheetml-document.md @@ -30,13 +30,13 @@ related elements. **In This Section** [Important Spreadsheet -Parts](3b35a153-c8ff-4dc7-96d5-02c515f31770.htm#ImpSSParts) +Parts](structure-of-a-spreadsheetml-document.md#ImpSSParts) [Minimum Workbook -Scenario](3b35a153-c8ff-4dc7-96d5-02c515f31770.htm#MinWBScenario) +Scenario](structure-of-a-spreadsheetml-document.md#MinWBScenario) [Typical Workbook -Scenario](3b35a153-c8ff-4dc7-96d5-02c515f31770.htm#TypWBScenario) +Scenario](structure-of-a-spreadsheetml-document.md#TypWBScenario) -------------------------------------------------------------------------------- @@ -65,33 +65,25 @@ Conditional Formatting|conditionalFormatting|ConditionalFormatting|A construct t -------------------------------------------------------------------------------- -The following text from the [Standard -ECMA-376](http://www.ecma-international.org/publications/standards/Ecma-376.htm) +The following text from the [Standard ECMA-376](http://www.ecma-international.org/publications/standards/Ecma-376.htm) introduces the minimum workbook scenario. The smallest possible (blank) workbook must contain the following: -????????A single sheet +A single sheet -????????A sheet ID +A sheet ID -????????A relationship Id that points to the location of the sheet -definition +A relationship Id that points to the location of the sheet definition -?? Ecma International: December 2006. +© Ecma International: December 2006. ### Open XML SDK Code Example This code example uses the classes in the Open XML SDK 2.5 to create a minimum, blank workbook. - -C\#?? - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```csharp public static void CreateSpreadsheetWorkbook(string filepath) { // Create a spreadsheet document by supplying the filepath. @@ -118,14 +110,9 @@ code](./media/copycode.gif "Copy code")Copy code // Close the document. spreadsheetDocument.Close(); } +``` - -Visual Basic?? - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```vb Public Sub CreateSpreadsheetWorkbook(ByVal filepath As String) ' Create a spreadsheet document by supplying the filepath. ' By default, AutoSave = true, Editable = true, and Type = xlsx. @@ -155,6 +142,7 @@ code](./media/copycode.gif "Copy code")Copy code ' Close the document. spreadsheetDocument.Close() End Sub +``` ### Generated SpreadsheetML @@ -165,15 +153,13 @@ on the minimum spreadsheet from **.xlsx** to **.zip**. Inside the .zip package, there are several parts that make up the minimum workbook. -The following figure shows the structure under the xl folder of the .zip package for a minimum +The following figure shows the structure under the xl folder of the .zip package for a minimum workbook. Figure 1. .zip folder structure - ![Structure of a minimum -workbook](./media/odc_oxml_xl_documentstructure_fig02.gif) + ![Structure of a minimum workbook](./media/odc_oxml_xl_documentstructure_fig02.gif) The **workbook.xml** file contains \<sheet\> elements that reference the worksheets in the workbook. Each worksheet is associated to the workbook via a Sheet @@ -187,19 +173,14 @@ The following XML code is the spreadsheetML that represents the workbook part of the spreadsheet document. This code is generated when you run the Open XML SDK 2.5 code to create a minimum workbook. - -XML?? - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```xml +``` The **workbook.xml.rels** file contains the \<**Relationship**\> elements that define the @@ -209,41 +190,29 @@ The following XML code is the spreadsheetML that represents the relationship part of the spreadsheet document. This code is generated when you run the Open XML SDK 2.5 to create a minimum workbook. - -XML?? - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```xml +``` The **sheet.xml** file contains the \<sheetData\> element that represents the cell table. In this example, the workbook is blank, so the \<sheetData\> element is empty. For more -information about sheets, see [Working with sheets -(Open XML SDK)](working-with-sheets.htm). +information about sheets, see [Working with sheets (Open XML SDK)](working-with-sheets.md). The following XML code is the spreadsheetML that represents the worksheet part of the spreadsheet document. This code is generated when you run the Open XML SDK 2.5 to create a minimum workbook. - -XML?? - ![Copy -code](./media/copycode.gif "Copy code")Copy code +```xml - +``` -------------------------------------------------------------------------------- @@ -258,5 +227,4 @@ typical spreadsheet. Figure 2. Typical spreadsheet elements - ![Structure of a SpreadsheetML -document](./media/odc_oxml_xl_documentstructure_fig01.gif) + ![Structure of a SpreadsheetML document](./media/odc_oxml_xl_documentstructure_fig01.gif) diff --git a/docs/structure-of-a-wordprocessingml-document.md b/docs/structure-of-a-wordprocessingml-document.md index eeedc50..44a21b0 100644 --- a/docs/structure-of-a-wordprocessingml-document.md +++ b/docs/structure-of-a-wordprocessingml-document.md @@ -34,14 +34,11 @@ class="keyword">t\> element contains a range of text. **In This Section** -[Important WordprocessingML -Parts](03636fa2-be44-4e8d-9c26-7d38415bb459.htm#ImpWPParts) +[Important WordprocessingML Parts](structure-of-a-wordprocessingml-document.md#ImpWPParts) -[Minimum Document -Scenario](03636fa2-be44-4e8d-9c26-7d38415bb459.htm#MinDocScen) +[Minimum Document Scenario](structure-of-a-wordprocessingml-document.md#MinDocScen) -[Typical Document -Scenario](03636fa2-be44-4e8d-9c26-7d38415bb459.htm#TypDocScen) +[Typical Document Scenario](structure-of-a-wordprocessingml-document.md#TypDocScen) -------------------------------------------------------------------------------- @@ -103,8 +100,7 @@ represented by the main document part. At a minimum, to create a valid **WordprocessingML** document using code, add a main document part to the document. -The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) introduces the WordprocessingML elements required in the main document part in order to complete the minimum document scenario. @@ -150,6 +146,7 @@ class="keyword">WordprocessingML document that contains the text } } ``` + ```vb Public Shared Sub CreateWordDoc(filepath As String, msg As String) Using doc As WordprocessingDocument = WordprocessingDocument.Create(filepath, DocumentFormat.OpenXml.WordprocessingDocumentType.Document) @@ -167,6 +164,7 @@ class="keyword">WordprocessingML document that contains the text End Using End Sub ``` + ### Generated WordprocessingML After you run the Open XML SDK 2.5 code in the previous section to diff --git a/docs/understanding-the-open-xml-file-formats.md b/docs/understanding-the-open-xml-file-formats.md index 20eb94a..437cb0e 100644 --- a/docs/understanding-the-open-xml-file-formats.md +++ b/docs/understanding-the-open-xml-file-formats.md @@ -21,20 +21,15 @@ the Open XML file formats and markup languages. -------------------------------------------------------------------------------- - [Introduction to markup compatibility (Open XML -SDK)](introduction-to-markup-compatibility.htm) +[Introduction to markup compatibility (Open XML SDK)](introduction-to-markup-compatibility.md) - [Working with PresentationML documents (Open XML -SDK)](working-with-presentationml-documents.htm) +[Working with PresentationML documents (Open XML SDK)](working-with-presentationml-documents.md) - [Working with SpreadsheetML documents (Open XML -SDK)](working-with-spreadsheetml-documents.htm) +[Working with SpreadsheetML documents (Open XML SDK)](working-with-spreadsheetml-documents.md) - [Working with WordprocessingML documents (Open XML -SDK)](working-with-wordprocessingml-documents.htm) +[Working with WordprocessingML documents (Open XML SDK)](working-with-wordprocessingml-documents.md) -------------------------------------------------------------------------------- - [How do I... (Open XML -SDK)](how-do-i.htm) +[How do I... (Open XML SDK)](how-do-i.md) diff --git a/docs/what-s-new-in-the-open-xml-sdk-2-5.md b/docs/what-s-new-in-the-open-xml-sdk-2-5.md index a20be11..5fcbc31 100644 --- a/docs/what-s-new-in-the-open-xml-sdk-2-5.md +++ b/docs/what-s-new-in-the-open-xml-sdk-2-5.md @@ -40,9 +40,7 @@ XML SDK 2.5 for Office in addition to known issues and limitations. -------------------------------------------------------------------------------- The Open XML SDK 2.5 is a collection of classes that let you create and -manipulate Open XML documents - documents that adhere to the [Office -Open XML File Formats -Standard](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463). +manipulate Open XML documents - documents that adhere to the [Office Open XML File Formats Standard](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463). Because the SDK provides an application program interface that lets you manipulate Open XML documents directly, you can do so without the need for the Office client products themselves in both client and server @@ -85,48 +83,20 @@ documentation in the left pane. **Table 1. DocumentFormat.OpenXml.Office15 classes** - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Class

Description

**DocumentFormat.OpenXml.Office15.Excel**

Supports new PivotTable features, timeline, and the other new features of Excel

**DocumentFormat.OpenXml.Office15.Word**

Supports new Comment features (e.g. Comments pane) and other new features of Word. For example, the **CommentEx class reads the comments author; The WebVideoProperty** property is used to insert a video in a Word document

**DocumentFormat.OpenXml.Office15.PowerPoint, Theme**

Supports comment hint, theme family, and the other new features of PowerPoint

**DocumentFormat.OpenXml.Office15.Drawing**

Supports new Charts, PivotCharts, and other new Drawing and Chart features

**DocumentFormat.OpenXml.Office15.WebExtension, WebExtentionPane**

Supports app for Office and Task Pane app for Office features. The classes are viable for inserting or modifying app for Office into Word and Excel document files

+| Class | Description | +|---|---| +| **DocumentFormat.OpenXml.Office15.Excel** | Supports new PivotTable features, timeline, and the other new features of Excel | +| **DocumentFormat.OpenXml.Office15.Word** | Supports new Comment features (e.g. Comments pane) and other new features of Word. For example, the **CommentEx** class reads the comments author; The **WebVideoProperty** property is used to insert a video in a Word document | +| **DocumentFormat.OpenXml.Office15.PowerPoint, Theme** | Supports comment hint, theme family, and the other new features of PowerPoint | +| **DocumentFormat.OpenXml.Office15.Drawing** | Supports new Charts, PivotCharts, and other new Drawing and Chart features | +| **DocumentFormat.OpenXml.Office15.WebExtension, WebExtentionPane** | Supports app for Office and Task Pane app for Office features. The classes are viable for inserting or modifying app for Office into Word and Excel document files | For code samples demonstrating how to use these new classes, please -refer to new articles posted to [Open XML Format SDK -Forum](http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/threads) in +refer to new articles posted to [Open XML Format SDK Forum](http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/threads) in the Microsoft Developer Network. ---------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- The Open XML SDK 2.5 can read ISO/IEC 29500 Strict Format files. Its document contents are recognized as an Open XML Transitional Format file @@ -157,75 +127,54 @@ element members. **ExtensionList:** -- DocumentFormat.OpenXml.Drawing.ConnectionShapeLocks +- DocumentFormat.OpenXml.Drawing.ConnectionShapeLocks - **DocumentFormat.OpenXml.Drawing.Theme** -- DocumentFormat.OpenXml.Drawing.ChartDrawing.NonVisualGroupShapeDrawingProperties +- DocumentFormat.OpenXml.Drawing.ChartDrawing.NonVisualGroupShapeDrawingProperties -- DocumentFormat.OpenXml.Drawing.Charts.MultiLevelStringReference +- DocumentFormat.OpenXml.Drawing.Charts.MultiLevelStringReference -- DocumentFormat.OpenXml.Drawing.Charts.NumberReference +- DocumentFormat.OpenXml.Drawing.Charts.NumberReference -- DocumentFormat.OpenXml.Drawing.Charts.StringReference +- DocumentFormat.OpenXml.Drawing.Charts.StringReference -- DocumentFormat.OpenXml.Drawing.Charts.SurfaceChartSeries +- DocumentFormat.OpenXml.Drawing.Charts.SurfaceChartSeries -- DocumentFormat.OpenXml.Drawing.Diagrams.DataModelRoot +- DocumentFormat.OpenXml.Drawing.Diagrams.DataModelRoot -- DocumentFormat.OpenXml.Drawing.Spreadsheet.NonVisualDrawingProperties +- DocumentFormat.OpenXml.Drawing.Spreadsheet.NonVisualDrawingProperties -- DocumentFormat.OpenXml.Drawing.Spreadsheet.NonVisualGroupShapeDrawingProperties +- DocumentFormat.OpenXml.Drawing.Spreadsheet.NonVisualGroupShapeDrawingProperties -- DocumentFormat.OpenXml.Office.Drawing.NonVisualGroupDrawingShapeProperties +- DocumentFormat.OpenXml.Office.Drawing.NonVisualGroupDrawingShapeProperties -- DocumentFormat.OpenXml.Office2010.Excel.SlicerCacheDefinition +- DocumentFormat.OpenXml.Office2010.Excel.SlicerCacheDefinition -- DocumentFormat.OpenXml.Office2010.Word.DrawingGroup.NonVisualGroupDrawingShapeProperties +- DocumentFormat.OpenXml.Office2010.Word.DrawingGroup.NonVisualGroupDrawingShapeProperties -- DocumentFormat.OpenXml.Presentation.CommentAuthor +- DocumentFormat.OpenXml.Presentation.CommentAuthor -- DocumentFormat.OpenXml.Presentation.NonVisualGroupShapeDrawingProperties +- DocumentFormat.OpenXml.Presentation.NonVisualGroupShapeDrawingProperties -- DocumentFormat.OpenXml.Spreadsheet.PivotFilter +- DocumentFormat.OpenXml.Spreadsheet.PivotFilter -- DocumentFormat.OpenXml.Spreadsheet.QueryTable +- DocumentFormat.OpenXml.Spreadsheet.QueryTable **ExtensionListWithModification:** -- DocumentFormat.OpenXml.Presentation.Comment +- DocumentFormat.OpenXml.Presentation.Comment -- DocumentFormat.OpenXml.Presentation.HandoutMaster +- DocumentFormat.OpenXml.Presentation.HandoutMaster -- DocumentFormat.OpenXml.Presentation.NotesMaster +- DocumentFormat.OpenXml.Presentation.NotesMaster -- DocumentFormat.OpenXml.Presentation.SlideLayout +- DocumentFormat.OpenXml.Presentation.SlideLayout -- DocumentFormat.OpenXml.Presentation.SlideMaster +- DocumentFormat.OpenXml.Presentation.SlideMaster ---------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- The following section discusses deprecated API members: @@ -266,8 +215,7 @@ DocumentFormat.OpenXml.Wordprocessing: The Open XML SDK 2.0 classes for Office 2010 *beta only* Open XML tags are deprecated. For example, the beta only non-visual properties of -DocumentFormat.OpenXml.Office2010.Drawing.ChartDrawing, +DocumentFormat.OpenXml.Office2010.Drawing.ChartDrawing, **DocumentFormat.OpenXml.Office2010.Word**, and **DocumentFormat.OpenXml.Office2010.Drawing** have been removed from the Open XML SDK 2.5. diff --git a/docs/word-processing.md b/docs/word-processing.md index 8e20440..09a24e8 100644 --- a/docs/word-processing.md +++ b/docs/word-processing.md @@ -21,111 +21,61 @@ documents using the Open XML SDK 2.5 for Office. -------------------------------------------------------------------------------- - [How to: Accept all revisions in a word processing -document (Open XML SDK)](how-to-accept-all-revisions-in-a-word-processing-document.htm) - +[How to: Accept all revisions in a word processing document (Open XML SDK)](how-to-accept-all-revisions-in-a-word-processing-document.md) - [How to: Add tables to word processing documents -(Open XML SDK)](how-to-add-tables-to-word-processing-documents.htm) +[How to: Add tables to word processing documents (Open XML SDK)](how-to-add-tables-to-word-processing-documents.md) - [How to: Apply a style to a paragraph in a word -processing document (Open XML -SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.htm) +[How to: Apply a style to a paragraph in a word processing document (Open XML SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md) - [How to: Change the print orientation of a word -processing document (Open XML -SDK)](how-to-change-the-print-orientation-of-a-word-processing-document.htm) +[How to: Change the print orientation of a word processing document (Open XML SDK)](how-to-change-the-print-orientation-of-a-word-processing-document.md) - [How to: Change text in a table in a word processing -document (Open XML SDK)](how-to-change-text-in-a-table-in-a-word-processing-document.htm) - +[How to: Change text in a table in a word processing document (Open XML SDK)](how-to-change-text-in-a-table-in-a-word-processing-document.md) - [How to: Convert a word processing document from the -DOCM to the DOCX file format (Open XML -SDK)](how-to-convert-a-word-processing-document-from-the-docm-to-the-docx-file-format.htm) +[How to: Convert a word processing document from the DOCM to the DOCX file format (Open XML SDK)](how-to-convert-a-word-processing-document-from-the-docm-to-the-docx-file-format.md) - [How to: Create and add a character style to a word -processing document (Open XML -SDK)](how-to-create-and-add-a-character-style-to-a-word-processing-document.htm) +[How to: Create and add a character style to a word processing document (Open XML SDK)](how-to-create-and-add-a-character-style-to-a-word-processing-document.md) - [How to: Create and add a paragraph style to a word -processing document (Open XML -SDK)](how-to-create-and-add-a-paragraph-style-to-a-word-processing-document.htm) +[How to: Create and add a paragraph style to a word processing document (Open XML SDK)](how-to-create-and-add-a-paragraph-style-to-a-word-processing-document.md) - [How to: Create a word processing document by -providing a file name (Open XML -SDK)](how-to-create-a-word-processing-document-by-providing-a-file-name.htm) +[How to: Create a word processing document by providing a file name (Open XML SDK)](how-to-create-a-word-processing-document-by-providing-a-file-name.md) - [How to: Delete comments by all or a specific author -in a word processing document (Open XML -SDK)](how-to-delete-comments-by-all-or-a-specific-author-in-a-word-processing-document.htm) +[How to: Delete comments by all or a specific author in a word processing document (Open XML SDK)](how-to-delete-comments-by-all-or-a-specific-author-in-a-word-processing-document.md) - [How to: Extract styles from a word processing -document (Open XML SDK)](how-to-extract-styles-from-a-word-processing-document.htm) - +[How to: Extract styles from a word processing document (Open XML SDK)](how-to-extract-styles-from-a-word-processing-document.md) - [How to: Insert a comment into a word processing -document (Open XML SDK)](how-to-insert-a-comment-into-a-word-processing-document.htm) - +[How to: Insert a comment into a word processing document (Open XML SDK)](how-to-insert-a-comment-into-a-word-processing-document.md) - [How to: Insert a picture into a word processing -document (Open XML SDK)](how-to-insert-a-picture-into-a-word-processing-document.htm) - +[How to: Insert a picture into a word processing document (Open XML SDK)](how-to-insert-a-picture-into-a-word-processing-document.md) - [How to: Insert a table into a word processing -document (Open XML SDK)](how-to-insert-a-table-into-a-word-processing-document.htm) - +[How to: Insert a table into a word processing document (Open XML SDK)](how-to-insert-a-table-into-a-word-processing-document.md) - [How to: Open and add text to a word processing -document (Open XML SDK)](how-to-open-and-add-text-to-a-word-processing-document.htm) - +[How to: Open and add text to a word processing document (Open XML SDK)](how-to-open-and-add-text-to-a-word-processing-document.md) - [How to: Open a word processing document for -read-only access (Open XML -SDK)](how-to-open-a-word-processing-document-for-read-only-access.htm) +[How to: Open a word processing document for read-only access (Open XML SDK)](how-to-open-a-word-processing-document-for-read-only-access.md) - [How to: Open a word processing document from a -stream (Open XML SDK)](how-to-open-a-word-processing-document-from-a-stream.htm) +[How to: Open a word processing document from a stream (Open XML SDK)](how-to-open-a-word-processing-document-from-a-stream.md) - [How to: Remove hidden text from a word processing -document (Open XML SDK)](how-to-remove-hidden-text-from-a-word-processing-document.htm) - +[How to: Remove hidden text from a word processing document (Open XML SDK)](how-to-remove-hidden-text-from-a-word-processing-document.md) - [How to: Remove the headers and footers from a word -processing document (Open XML -SDK)](how-to-remove-the-headers-and-footers-from-a-word-processing-document.htm) +[How to: Remove the headers and footers from a word processing document (Open XML SDK)](how-to-remove-the-headers-and-footers-from-a-word-processing-document.md) - [How to: Replace the header in a word processing -document (Open XML SDK)](how-to-replace-the-header-in-a-word-processing-document.htm) - +[How to: Replace the header in a word processing document (Open XML SDK)](how-to-replace-the-header-in-a-word-processing-document.md) - [How to: Replace the styles parts in a word -processing document (Open XML -SDK)](how-to-replace-the-styles-parts-in-a-word-processing-document.htm) +[How to: Replace the styles parts in a word processing document (Open XML SDK)](how-to-replace-the-styles-parts-in-a-word-processing-document.md) - [How to: Retrieve comments from a word processing -document (Open XML SDK)](how-to-retrieve-comments-from-a-word-processing-document.htm) - +[How to: Retrieve comments from a word processing document (Open XML SDK)](how-to-retrieve-comments-from-a-word-processing-document.md) -[How to: Retrieve Property Values from a Word 2007 Document by Using the -Open XML -API](http://msdn.microsoft.com/library/e0aacc31-524a-4392-aafa-290bbf7ae7b9(Office.15).aspx) +[How to: Retrieve Property Values from a Word 2007 Document by Using the Open XML API](http://msdn.microsoft.com/library/e0aacc31-524a-4392-aafa-290bbf7ae7b9(Office.15).aspx) - [How to: Set a custom property in a word processing -document (Open XML SDK)](how-to-set-a-custom-property-in-a-word-processing-document.htm) - +[How to: Set a custom property in a word processing document (Open XML SDK)](how-to-set-a-custom-property-in-a-word-processing-document.md) - [How to: Set the font for a text run (Open XML -SDK)](how-to-set-the-font-for-a-text-run.htm) +[How to: Set the font for a text run (Open XML SDK)](how-to-set-the-font-for-a-text-run.md) - [How to: Validate a word processing document (Open -XML SDK)](how-to-validate-a-word-processing-document.htm) +[How to: Validate a word processing document (Open XML SDK)](how-to-validate-a-word-processing-document.md) -------------------------------------------------------------------------------- - [How do I... (Open XML -SDK)](how-do-i.htm) +[How do I... (Open XML SDK)](how-do-i.md) - [Getting started with the Open XML SDK 2.5 for -Office](getting-started.htm) +[Getting started with the Open XML SDK 2.5 for Office](getting-started.md) diff --git a/docs/working-with-animation.md b/docs/working-with-animation.md index 231bdb9..1f167e8 100644 --- a/docs/working-with-animation.md +++ b/docs/working-with-animation.md @@ -20,14 +20,12 @@ target="T:DocumentFormat.OpenXml.Presentation.Animate">Animate class and how it relates to the Open XML File Format PresentationML schema. For more information about the overall structure of the parts and elements that make up a -PresentationML document, see [Structure of a PresentationML -Document](structure-of-a-presentationml-document.htm). +PresentationML document, see [Structure of a PresentationML Document](structure-of-a-presentationml-document.md). -------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Animation section of the Open XML PresentationML framework as follows: @@ -45,18 +43,19 @@ described in this schema are contained within the slide XML file. More specifically they are in the \ and the \ element as shown below: -\ -    \ … \ -    \ … \ -    \ … \ -    \ … \ -\ +```xml + +     +     +     +     + +``` © ISO/IEC29500: 2008. Animation consists of several behaviors, the most basic of which is the -Animate behavior, represented by the \ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +Animate behavior, represented by the \ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent basic animation behavior in a PresentationML document as follows: @@ -67,23 +66,23 @@ text within a shape or even the shape itself.[Example: Consider trying to emphasize text within a shape by changing the size of its font by 150%. The \ element should be used as follows: -\ -    \ -        \ -        \ -            \ -                \ -                    \ -                \ -            \ -        \ -        \ -            \style.fontSize\ -        \ -    \ -\ - -end example] +```xml + +     +         +         +             +                 +                     +                 +             +         +         +            style.fontSize +         +     + +``` © ISO/IEC29500: 2008. @@ -93,11 +92,10 @@ correspond to them. **PresentationML Element**|**Open XML SDK 2.5 Class** ---|--- -|CommonBehavior -|TimeAnimateValueList +\|CommonBehavior +\|TimeAnimateValueList -The following table from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following table from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the attributes of the \ element. **Attributes**|**Description** @@ -126,64 +124,62 @@ class="keyword">Animate class are shown in the following list. ### CommonBehavior Class The **CommonBehavior** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \element: This element describes the common behaviors of animations. -[Example: Consider trying to emphasize text within a shape by changing +Example: Consider trying to emphasize text within a shape by changing the size of its font. The \ element should be used as follows: -\ -    \ -        \ -        \ -            \ -                \ -                   \ -                \ -           \ -        \ -        \ -            \style.fontSize\ -        \ -    \ -\ - -end example] +```xml + +     +         +         +             +                 +                    +                 +            +         +         +            style.fontSize +         +     + +``` © ISO/IEC29500: 2008. ### TimeAnimateValueList Class The **TimeAnimateValueList** class corresponds -to the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +to the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies a list of time animated value elements. -[Example: Consider a shape with a "fly-in" animation. The \ +Example: Consider a shape with a "fly-in" animation. The \ element should be used as follows: -\ -    \ … \ -    \ -        \ -            \ -                \ -            \ -        \ -        \ -            \ -                \ -            \ -        \ -    \ -\ - -end example] +```xml + +     +     +         +             +                 +             +         +         +             +                 +             +         +     + +``` © ISO/IEC29500: 2008. @@ -212,17 +208,12 @@ target child elements to which the animation effects are applied. #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) -[How to: Create a Presentation by Providing a File -Name](how-to-create-a-presentation-document-by-providing-a-file-name.htm) +[How to: Create a Presentation by Providing a File Name](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) diff --git a/docs/working-with-comments.md b/docs/working-with-comments.md index 042bf5f..1a52b98 100644 --- a/docs/working-with-comments.md +++ b/docs/working-with-comments.md @@ -21,13 +21,12 @@ class="nolink">Comment class and how it relates to the Open XML File Format PresentationML schema. For more information about the overall structure of the parts and elements that make up a PresentationML document, see [Structure of a PresentationML -Document](structure-of-a-presentationml-document.htm). +Document](structure-of-a-presentationml-document.md). --------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Comments section of the Open XML PresentationML framework as follows: @@ -42,8 +41,7 @@ their visual appearance. © ISO/IEC29500: 2008. -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent comments in a PresentationML document as follows: @@ -51,14 +49,13 @@ This element specifies a single comment attached to a slide. It contains the text of the comment, its position on the slide, and attributes referring to its author and date. -[Example: - -\ -   \ -   \Add diagram to clarify.\ -\ - -end example] +Example: +```xml + +    +   Add diagram to clarify. + +``` © ISO/IEC29500: 2008. @@ -68,17 +65,16 @@ correspond to them. **PresentationML Element**|**Open XML SDK 2.5 Class** ---|--- -|ExtensionListWithModification -|Position -|Text +\|ExtensionListWithModification +\|Position +\|Text -The following table from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following table from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the attributes of the \ element. **Attributes**|**Description** ---|--- -authorId|This attribute specifies the author of the comment.It refers to the ID of an author in thecomment author list for the document.
The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. +authorId|This attribute specifies the author of the comment.It refers to the ID of an author in the comment author list for the document.
The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. dt|This attribute specifies the date and time this comment was last modified.
The possible values for this attribute are defined by the W3C XML Schema **datetime** datatype. idx|This attribute specifies an identifier for this comment that is unique within a list of all comments by this author in this document. An author's first comment in a document has index 1.
[Note: Because the index is unique only for the comment author, a document can contain multiple comments with the same index created by different authors. end note]
The possible values for this attribute are defined by the ST_Index simple type (§19.7.3). @@ -101,8 +97,7 @@ class="keyword">Comment class are shown in the following list. The **ExtensionListWithModification** class corresponds to the \element. The following information from the -[ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the extension list with modification ability @@ -112,16 +107,16 @@ extend the storage capabilities of the PresentationML framework. This allows for various new kinds of data to be stored natively within the framework. -[Note: Using this extLst element allows the generating application to -store whether this extension property has been modified. end note] +> [!NOTE] +> Using this extLst element allows the generating application to +store whether this extension property has been modified. end note © ISO/IEC29500: 2008. ### Position Class The **Position** class corresponds to the -\element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the positioning information for the placement of @@ -147,8 +142,7 @@ application chooses to display comments. end note] ### Text class The **Text** class corresponds to the -\element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the content of a comment. This is the text with @@ -212,7 +206,7 @@ the comment. The following code segment from the article [How to: Add a comment to a slide in a presentation (Open XML -SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.htm) adds a new +SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.md) adds a new comments part to an existing slide in a presentation (if the slide does not already contain comments) and creates an instance of an Open XML SDK 2.0 **Comment** class in the slide comments @@ -268,6 +262,7 @@ article. new Position() { X = 100, Y = 200 }, new Text() { Text = text }); ``` + ```vb ' Declare a comments part. Dim commentsPart As SlideCommentsPart @@ -311,11 +306,12 @@ article. {.X = 100, .Y = 200}, New Text() With {.Text = text}) ``` + --------------------------------------------------------------------------------- When the Open XML SDK 2.5 code in [How to: Add a comment to a slide in a presentation (Open XML -SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.htm) is run, including +SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.md) is run, including the segment shown in this article, the following XML is written to a new CommentAuthors.xml part in the existing PresentationML document referenced in the code, assuming that the document contained no comments @@ -331,6 +327,7 @@ or comment authors before the code was run. clrIdx="0" /> ``` + In addition, the following XML is written to a new Comments.xml part in the existing PresentationML document referenced in the code in the article. @@ -346,21 +343,16 @@ article. commentText
- ``` + -------------------------------------------------------------------------------- #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) -[How to: Create a Presentation by Providing a File -Name](how-to-create-a-presentation-document-by-providing-a-file-name.htm) +[How to: Create a Presentation by Providing a File Name](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Add a comment to a slide in a presentation -(Open XML SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.htm) +[How to: Add a comment to a slide in a presentation (Open XML SDK)](how-to-add-a-comment-to-a-slide-in-a-presentation.md) - [How to: Delete all the comments by an author from -all the slides in a presentation (Open XML -SDK)](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.htm) +[How to: Delete all the comments by an author from all the slides in a presentation (Open XML SDK)](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md) diff --git a/docs/working-with-conditional-formatting.md b/docs/working-with-conditional-formatting.md index 8d85200..f00cae9 100644 --- a/docs/working-with-conditional-formatting.md +++ b/docs/working-with-conditional-formatting.md @@ -20,9 +20,7 @@ target="T:DocumentFormat.OpenXml.Spreadsheet.ConditionalFormatting">ConditionalFormatting class and how it relates to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that -make up a SpreadsheetML document, see [Structure of a -SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.htm). +make up a SpreadsheetML document, see [Structure of a SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md). --------------------------------------------------------------------------------- @@ -67,8 +65,7 @@ class="keyword">ConditionalFormatting class to manipulate individual \<**conditionalFormatting**\> elements in a SpreadsheetML document. -The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the ConditionalFormatting (\<conditionalFormatting\>) element. @@ -78,17 +75,15 @@ that a spreadsheet application can automatically apply to cells if a specified condition is true. This collection expresses conditional formatting rules applied to a particular cell or range. -[Example: This example applies a 'top10' rule to the cells C3:C8. The +Example: This example applies a 'top10' rule to the cells C3:C8. The @dxfId references the formatting (defined in the styles part) to be applied to cells that match the criteria. -    \ - -        \ - -    \ - -end example] +```xml +     +         +     +``` © ISO/IEC29500: 2008. @@ -101,24 +96,20 @@ introduces the **ConditionalFormattingRule** This collection represents a description of a conditional formatting rule. -[Example: +Example: This example shows a conditional formatting rule highlighting cells whose values are greater than 0.5. Note that in this case the content of \ is a static value, but can also be a formula expression. -    \ - -        \ - -            \0.5\ - -        \ +```xml +     +         +            0.5 +         +     +``` -    \ - -end example] Only rules with a type attribute value of expression support formula syntax. @@ -150,23 +141,19 @@ class="keyword">dataBar\>) element. Describes a data bar conditional formatting rule. -[Example: +Example: In this example a data bar conditional format is expressed, which spreads across all cell values in the cell range, and whose color is blue. -    \ - -        \ - -        \ - -        \ - -    \ - -end example] +```xml +     +         +         +         +     +``` The length of the data bar for any cell can be calculated as follows: @@ -206,21 +193,15 @@ class="keyword">colorScale\>) element. Describes a gradated color scale in this conditional formatting rule. -[Example: - -    \ - -        \ - -        \ - -        \ - -        \ - -    \ - -end example] +Example: +```xml +     +         +         +         +         +     +``` © ISO/IEC29500: 2008. @@ -242,24 +223,20 @@ class="keyword">iconSet\>) element. Describes an icon set conditional formatting rule. -[Example: This example demonstrates the "3Arrows" style of icons. The +Example: This example demonstrates the "3Arrows" style of icons. The first icon in the set must be shown if the cell's value is less than the 33rd percentile. The second icon in the set must be shown if the cell's value is less than the 67th percentile, and greater than or equal to the 33rd percentile. The third icon in the set must be shown if the cell's value is greater than or equal to the 67th percentile. -    \ - -        \ - -        \ - -        \ - -    \ - -end example] +```xml +     +         +         +         +     +``` © ISO/IEC29500: 2008. diff --git a/docs/working-with-formulas.md b/docs/working-with-formulas.md index bc15102..edd511d 100644 --- a/docs/working-with-formulas.md +++ b/docs/working-with-formulas.md @@ -22,7 +22,7 @@ Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a SpreadsheetML document, see [Structure of a SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.htm). +SDK)](structure-of-a-spreadsheetml-document.md). -------------------------------------------------------------------------------- @@ -49,8 +49,7 @@ class="keyword">CellValue class, see CellValue. -The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the **cellFormula** (\<**f**\>) element. diff --git a/docs/working-with-handout-master-slides.md b/docs/working-with-handout-master-slides.md index 9d06fbf..77d5ab6 100644 --- a/docs/working-with-handout-master-slides.md +++ b/docs/working-with-handout-master-slides.md @@ -21,14 +21,12 @@ class="nolink">HandoutMaster class and how it relates to the Open XML File Format PresentationML schema. For more information about the overall structure of the parts and elements that make up a PresentationML document, see [Structure of a -PresentationML document (Open XML -SDK)](structure-of-a-presentationml-document.htm). +PresentationML document (Open XML SDK)](structure-of-a-presentationml-document.md). --------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a handout master slide in a PresentationML document as follows: @@ -49,10 +47,10 @@ SDK 2.5 classes that correspond to them. **PresentationML Element**|**Open XML SDK 2.5 Class** ---|--- -|ColorMap -|CommonSlideData -|ExtensionListWithModification -|HeaderFooter +\|ColorMap +\|CommonSlideData +\|ExtensionListWithModification +\|HeaderFooter -------------------------------------------------------------------------------- @@ -70,8 +68,7 @@ sections. ### ColorMap Class The **ColorMap** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the mapping layer that transforms one color @@ -82,20 +79,20 @@ corresponding color in the theme. [Example: Consider the following mapping of colors that applies to a slide master: -\ +accent6="accent6" hlink="hlink" folHlink="folHlink"/> +``` -end example] © ISO/IEC29500: 2008. ### CommonSlideData Class The **CommonSlideData** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies a container for the type of slide information @@ -115,8 +112,7 @@ slides. The **ExtensionListWithModification** class corresponds to the \element. The following information from the -[ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the extension list with modification ability @@ -126,16 +122,16 @@ extend the storage capabilities of the PresentationML framework. This allows for various new kinds of data to be stored natively within the framework. -[Note: Using this extLst element allows the generating application to -store whether this extension property has been modified. end note] +> [!NOTE] +> Using this extLst element allows the generating application to +store whether this extension property has been modified. © ISO/IEC29500: 2008. ### HeaderFooter Class The **HeaderFooter** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the header and footer information for a slide. @@ -330,22 +326,14 @@ the PresentationML document referenced in the code. #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) - [How to: Create a presentation document by providing -a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) - +[How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) - [How to: Retrieve the number of slides in a -presentation document (Open XML -SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.htm) +[How to: Retrieve the number of slides in a presentation document (Open XML SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) diff --git a/docs/working-with-notes-slides.md b/docs/working-with-notes-slides.md index f32f27e..c762eee 100644 --- a/docs/working-with-notes-slides.md +++ b/docs/working-with-notes-slides.md @@ -23,8 +23,7 @@ Open XML File Format PresentationML schema. -------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent notes slides in a PresentationML document as follows: @@ -33,28 +32,28 @@ corresponding data. Contained within a notes slide are all the common slide elements along with additional properties that are specific to the notes element. -[Example: Consider the following PresentationML notes slide: +Example: Consider the following PresentationML notes slide: -\ -    \ +```xml + +             … -    \ +         … -\ + +``` In the above example a notes element specifies the existence of a notes slide with all of its parts. Notice the cSld element, which specifies the common elements that can appear on any slide type and then any elements specify additional non-common properties for this notes slide. -end example] © ISO/IEC29500: 2008. The \ element is the root element of the PresentationML Notes Slide part. For more information about the overall structure of the parts and elements that make up a PresentationML document, see -[Structure of a PresentationML -Document](structure-of-a-presentationml-document.htm). +[Structure of a PresentationML Document](structure-of-a-presentationml-document.md). The following table lists the child elements of the \ element used when working with notes slides and the Open XML SDK 2.5 classes @@ -66,8 +65,7 @@ that correspond to them. |CommonSlideData |ExtensionListWithModification -The following table from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following table from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the attributes of the \ element. **Attributes**|**Description** @@ -93,8 +91,7 @@ class="keyword">NotesSlide class are shown in the following list. ### ColorMapOverride Class The **ColorMapOverride** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element provides a mechanism with which to override the color @@ -109,8 +106,7 @@ slide, presentation slide, or slide layout. ### CommonSlideData Class The **CommonSlideData** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies a container for the type of slide information @@ -130,8 +126,7 @@ slides. The **ExtensionListWithModification** class corresponds to the \element. The following information from the -[ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the extension list with modification ability @@ -232,6 +227,7 @@ namespace. return notesSlidePart1; } ``` + ```vb Private Shared Function CreateNotesSlidePart(ByVal slidePart1 As SlidePart) As NotesSlidePart Dim notesSlidePart1 As NotesSlidePart = slidePart1.AddNewPart(Of NotesSlidePart)("rId6") @@ -304,17 +300,12 @@ the PresentationML document referenced in the code. #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) -[How to: Create a Presentation by Providing a File -Name](how-to-create-a-presentation-document-by-providing-a-file-name.htm) +[How to: Create a Presentation by Providing a File Name](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) diff --git a/docs/working-with-paragraphs.md b/docs/working-with-paragraphs.md index dd3daaf..3b1a3f5 100644 --- a/docs/working-with-paragraphs.md +++ b/docs/working-with-paragraphs.md @@ -118,6 +118,7 @@ a WordprocessingML document. } } ``` + ```vb Public Sub WriteToWordDoc(ByVal filepath As String, ByVal txt As String) ' Open a WordprocessingDocument for editing using the filepath. @@ -134,6 +135,7 @@ a WordprocessingML document. End Sub ``` + When this code is run, the following XML is written to the WordprocessingML document referenced in the code. @@ -143,22 +145,16 @@ WordprocessingML document referenced in the code. String from WriteToWordDoc method. - ``` + -------------------------------------------------------------------------------- #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) - [Working with runs (Open XML -SDK)](working-with-runs.htm) +[Working with runs (Open XML SDK)](working-with-runs.md) - [How to: Apply a style to a paragraph in a word -processing document (Open XML -SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.htm) +[How to: Apply a style to a paragraph in a word processing document (Open XML SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md) - [How to: Open and add text to a word processing -document (Open XML SDK)](how-to-open-and-add-text-to-a-word-processing-document.htm) - +[How to: Open and add text to a word processing document (Open XML SDK)](how-to-open-and-add-text-to-a-word-processing-document.md) diff --git a/docs/working-with-pivottables.md b/docs/working-with-pivottables.md index c9e79ff..d35c6da 100644 --- a/docs/working-with-pivottables.md +++ b/docs/working-with-pivottables.md @@ -21,14 +21,12 @@ class="nolink">PivotTableDefinition class and how it relates to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a SpreadsheetML document, see [Structure of a -SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.htm). +SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md). -------------------------------------------------------------------------------- -The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the PivotTableDefinition (\<pivotTableDefinition\>) element. diff --git a/docs/working-with-presentation-slides.md b/docs/working-with-presentation-slides.md index cda1688..13f66f7 100644 --- a/docs/working-with-presentation-slides.md +++ b/docs/working-with-presentation-slides.md @@ -21,14 +21,12 @@ class="nolink">Slide class and how it relates to the Open XML File Format PresentationML schema. For more information about the overall structure of the parts and elements that make up a PresentationML document, see [Structure of a -PresentationML document (Open XML -SDK)](structure-of-a-presentationml-document.htm). +PresentationML document (Open XML SDK)](structure-of-a-presentationml-document.md). --------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a presentation slide in a PresentationML document as follows: @@ -36,7 +34,7 @@ follows: This element specifies a slide within a slide list. The slide list is used to specify an ordering of slides. -[Example: Consider the following custom show with an ordering of slides. +Example: Consider the following custom show with an ordering of slides. ```xml @@ -54,14 +52,12 @@ used to specify an ordering of slides. In the above example the order specified to present the slides is slide 4, then 3, 2, and finally 5. -end example]" © ISO/IEC29500: 2008. The \ element is the root element of the PresentationML Slide part. For more information about the overall structure of the parts and -elements that make up a PresentationML document, see [Structure of a -PresentationML Document](structure-of-a-presentationml-document.htm). +elements that make up a PresentationML document, see [Structure of a PresentationML Document](structure-of-a-presentationml-document.md). The following table lists the child elements of the \ element used when working with presentation slides and the Open XML SDK 2.5 classes @@ -69,11 +65,11 @@ that correspond to them. **PresentationML Element**|**Open XML SDK 2.5 Class** ---|--- -|ColorMapOverride -|CommonSlideData -|ExtensionListWithModification -|Timing -|Transition +\|ColorMapOverride +\|CommonSlideData +\|ExtensionListWithModification +\|Timing +\|Transition -------------------------------------------------------------------------------- @@ -89,8 +85,7 @@ class are shown in the following sections. ### ColorMapOverride Class The **ColorMapOverride** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element provides a mechanism with which to override the color @@ -105,8 +100,7 @@ slide, presentation slide, or slide layout. ### CommonSlideData Class The **CommonSlideData** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies a container for the type of slide information @@ -126,8 +120,7 @@ slides. The **ExtensionListWithModification** class corresponds to the \element. The following information from the -[ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the extension list with modification ability @@ -145,8 +138,7 @@ store whether this extension property has been modified. end note] ### Timing Class The **Timing** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the timing information for handling all @@ -161,8 +153,7 @@ PresentationML framework. ### Transition Class The **Transition** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the kind of slide transition that should be used @@ -208,9 +199,7 @@ class="nolink">Shape class. -------------------------------------------------------------------------------- -The following method from the article [How to: Create -a presentation document by providing a file name (Open XML -SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) adds a new slide +The following method from the article [How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) adds a new slide part to an existing presentation and creates an instance of the Open XML SDK 2.5**Slide** class in the new slide part. The **Slide** class constructor creates @@ -262,6 +251,7 @@ namespace. return slidePart1; } ``` + ```vb Private Shared Function CreateSlidePart(ByVal presentationPart As PresentationPart) As SlidePart Dim slidePart1 As SlidePart = presentationPart.AddNewPart(Of SlidePart)("rId2") @@ -281,6 +271,7 @@ namespace. Return slidePart1 End Function ``` + To add another shape to the shape tree and, hence, to the slide, instantiate a second **Shape** object by passing an additional parameter that contains the following code to the @@ -298,6 +289,7 @@ passing an additional parameter that contains the following code to the new ListStyle(), new Paragraph(new EndParagraphRunProperties() { Language = "en-US" }))) ``` + ```vb New P.Shape(New P.NonVisualShapeProperties(New P.NonVisualDrawingProperties() With { _ .Id = CType(2UI, UInt32Value), _ @@ -307,8 +299,8 @@ passing an additional parameter that contains the following code to the }), New ApplicationNonVisualDrawingProperties(New PlaceholderShape())), New P.ShapeProperties(), New P.TextBody(New BodyProperties(), _ New ListStyle(), New Paragraph(New EndParagraphRunProperties() With { _ .Language = "en-US" }))) - ``` + --------------------------------------------------------------------------------- When the Open XML SDK code in the method is run, the following XML code @@ -352,28 +344,20 @@ is written to the PresentationML document file referenced in the code.     - ``` + -------------------------------------------------------------------------------- #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) - [How to: Retrieve the number of slides in a -presentation document (Open XML -SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.htm) +[How to: Retrieve the number of slides in a presentation document (Open XML SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) - [How to: Create a presentation document by providing -a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) - +[How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) diff --git a/docs/working-with-presentationml-documents.md b/docs/working-with-presentationml-documents.md index b9a6977..af1598a 100644 --- a/docs/working-with-presentationml-documents.md +++ b/docs/working-with-presentationml-documents.md @@ -21,29 +21,20 @@ documents. -------------------------------------------------------------------------------- - [Structure of a PresentationML document (Open XML -SDK)](structure-of-a-presentationml-document.htm) +[Structure of a PresentationML document (Open XML SDK)](structure-of-a-presentationml-document.md) - [Working with animation (Open XML -SDK)](working-with-animation.htm) +[Working with animation (Open XML SDK)](working-with-animation.md) - [Working with comments (Open XML -SDK)](working-with-comments.htm) +[Working with comments (Open XML SDK)](working-with-comments.md) - [Working with handout master slides (Open XML -SDK)](working-with-handout-master-slides.htm) +[Working with handout master slides (Open XML SDK)](working-with-handout-master-slides.md) - [Working with notes slides (Open XML -SDK)](working-with-notes-slides.htm) +[Working with notes slides (Open XML SDK)](working-with-notes-slides.md) - [Working with presentations (Open XML -SDK)](working-with-presentations.htm) +[Working with presentations (Open XML SDK)](working-with-presentations.md) - [Working with presentation slides (Open XML -SDK)](working-with-presentation-slides.htm) +[Working with presentation slides (Open XML SDK)](working-with-presentation-slides.md) - [Working with slide layouts (Open XML -SDK)](working-with-slide-layouts.htm) +[Working with slide layouts (Open XML SDK)](working-with-slide-layouts.md) - [Working with slide masters (Open XML -SDK)](working-with-slide-masters.htm) +[Working with slide masters (Open XML SDK)](working-with-slide-masters.md) diff --git a/docs/working-with-presentations.md b/docs/working-with-presentations.md index 56d5b76..0d3a210 100644 --- a/docs/working-with-presentations.md +++ b/docs/working-with-presentations.md @@ -21,14 +21,12 @@ class="nolink">Presentation class and how it relates to the Open XML File Format PresentationML schema. For more information about the overall structure of the parts and elements that make up a PresentationML document, see [Structure of a -PresentationML document (Open XML -SDK)](structure-of-a-presentationml-document.htm). +PresentationML document (Open XML SDK)](structure-of-a-presentationml-document.md). --------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a presentation in a PresentationML document as follows: @@ -69,8 +67,7 @@ size, and default text styles. The \ element is the root element of the PresentationML Presentation part. For more information about the overall structure of the parts and elements that make up a PresentationML document, see -[Structure of a PresentationML -Document](structure-of-a-presentationml-document.md). +[Structure of a PresentationML Document](structure-of-a-presentationml-document.md). The following table lists some of the most common child elements of the \ element used when working with presentations and the @@ -78,16 +75,16 @@ Open XML SDK 2.5 classes that correspond to them. **PresentationML Element**|**Open XML SDK 2.5 Class** ---|--- -|SlideMasterIdList -|SlideMasterId -|SlideIdList -|SlideId -|NotesMasterIdList -|HandoutMasterIdList -|CustomShowList -|SlideSize -|NotesSize -|DefaultTextStyle +\|SlideMasterIdList +\|SlideMasterId +\|SlideIdList +\|SlideId +\|NotesMasterIdList +\|HandoutMasterIdList +\|CustomShowList +\|SlideSize +\|NotesSize +\|DefaultTextStyle -------------------------------------------------------------------------------- @@ -106,8 +103,7 @@ sections. All slides that share the same master inherit the same layout from that master. The **SlideMasterIdList** class -corresponds to the \ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +corresponds to the \ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a slide master ID list in a PresentationML document as follows: @@ -122,8 +118,7 @@ be a template for all related child layout slides. ### SlideMasterId Class The **SlideMasterId** class corresponds to the -\ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a slide master ID in a PresentationML document as follows: @@ -133,27 +128,26 @@ corresponding presentation. A slide master is a slide that is specifically designed to be a template for all related child layout slides. -[Example: Consider the following specification of a slide master within +Example: Consider the following specification of a slide master within a presentation -\ +```xml +     … -    \ -        \ -    \ +     +         +         … -\ - -end example] + +``` © ISO/IEC29500: 2008. ### SlideIdList Class The **SlideIdList** class corresponds to the -\ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a slide ID list in a PresentationML document as follows: @@ -168,8 +162,7 @@ slide-specific shape and text information. ### SlideId Class The **SlideId** class corresponds to the -\ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a slide ID in a PresentationML document as follows: @@ -178,31 +171,30 @@ corresponding presentation. A slide contains the information that is specific to a single slide such as slide-specific shape and text information. -[Example: Consider the following specification of a slide master within +Example: Consider the following specification of a slide master within a presentation -\ +```xml +     … -    \ -        \ -        \ -        \ -        \ -        \ -    \ +     +         +         +         +         +         +         ... -\ - -end example] + +``` © ISO/IEC29500: 2008. ### NotesMasterIdList Class The **NotesMasterIdList** class corresponds to -the \ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a notes master ID list in a PresentationML document as follows: @@ -217,8 +209,7 @@ for the printing of the slide along with any attached notes. ### HandoutMasterIdList Class The **HandoutMasterIdList** class corresponds -to the \ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +to the \ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a handout master ID list in a PresentationML document as follows: @@ -233,8 +224,7 @@ for printing as a handout. ### CustomShowList Class The **CustomShowList** class corresponds to the -\ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent a custom show list in a PresentationML document as follows: @@ -249,8 +239,7 @@ presentation in any arbitrary order. ### SlideSize Class The **SlideSize** class corresponds to the -\ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent presentation slide size in a PresentationML document as follows: @@ -260,25 +249,24 @@ Objects within a presentation slide can be specified outside these extents, but this is the size of background surface that is shown when the slide is presented or printed. -[Example: Consider the following specifying of the size of a +Example: Consider the following specifying of the size of a presentation slide. -\ +```xml +     … -    \ +         … -\ - -end example] + +``` © ISO/IEC29500: 2008. ### NotesSize Class The **NotesSize** class corresponds to the -\ element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent notes slide size in a PresentationML document as follows: @@ -291,25 +279,24 @@ to specify the region to which content is fitted in any special format of printout the application might choose to generate, such as an outline handout. -[Example: Consider the following specifying of the size of a notes +Example: Consider the following specifying of the size of a notes slide. -\ +```xml +     … -    \ +         … -\ - -end example] + +``` © ISO/IEC29500: 2008. ### DefaultTextStyle Class The DefaultTextStyle class corresponds to the \ -element. The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +element. The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent default text style in a PresentationML document as follows: @@ -346,9 +333,7 @@ class="keyword">DefaultTextStyle classes. -------------------------------------------------------------------------------- -The following code example from the article [How to: -Create a presentation document by providing a file name (Open XML -SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) uses the [How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) uses the Create(String, PresentationDocumentType) @@ -407,6 +392,7 @@ presentation. // Code to create other parts of the presentation file goes here. } ``` + ```vb Public Shared Sub CreatePresentation(ByVal filepath As String) @@ -464,28 +450,20 @@ PresentationML document referenced in the code. - ``` + -------------------------------------------------------------------------------- #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) - [How to: Create a presentation document by providing -a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) - +[How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) - [How to: Retrieve the number of slides in a -presentation document (Open XML -SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.htm) +[How to: Retrieve the number of slides in a presentation document (Open XML SDK)](how-to-retrieve-the-number-of-slides-in-a-presentation-document.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) diff --git a/docs/working-with-runs.md b/docs/working-with-runs.md index c98b66e..c1efec0 100644 --- a/docs/working-with-runs.md +++ b/docs/working-with-runs.md @@ -119,6 +119,7 @@ formatting to the run. } } ``` + ```vb Public Sub WriteToWordDoc(ByVal filepath As String, ByVal txt As String) ' Open a WordprocessingDocument for editing using the filepath. @@ -155,16 +156,10 @@ WordprocessingML document specified in the preceding code. #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) - [Working with paragraphs (Open XML -SDK)](working-with-paragraphs.htm) +[Working with paragraphs (Open XML SDK)](working-with-paragraphs.md) - [How to: Apply a style to a paragraph in a word -processing document (Open XML -SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.htm) +[How to: Apply a style to a paragraph in a word processing document (Open XML SDK)](how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document.md) - [How to: Open and add text to a word processing -document (Open XML SDK)](how-to-open-and-add-text-to-a-word-processing-document.htm) - +[How to: Open and add text to a word processing document (Open XML SDK)](how-to-open-and-add-text-to-a-word-processing-document.md) diff --git a/docs/working-with-sheets.md b/docs/working-with-sheets.md index 9ebc1dc..e5901d8 100644 --- a/docs/working-with-sheets.md +++ b/docs/working-with-sheets.md @@ -25,14 +25,12 @@ class="nolink">DialogSheet classes and how they relate to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a SpreadsheetML document, see [Structure of a -SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.htm). +SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md). -------------------------------------------------------------------------------- -The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the **sheet** (\<sheet\>) element. @@ -80,11 +78,11 @@ introduces the minimum worksheet scenario. The smallest possible (blank) sheet is as follows: -\ - -    \ - -\ +```xml + +     + +``` The empty sheetData collection represents an empty grid; this element is required. As defined in the schema, some optional sheet property @@ -122,9 +120,8 @@ current value of the worksheet cell. If the value is a numeric value, it is stored directly in the \<**v**\> element in the XML file. If the value is a string value, it is stored in a shared string table. For more information about using the shared string table -to store string values, see [Working with the shared -string table (Open XML -SDK)](working-with-the-shared-string-table.htm). +to store string values, see [Working with the shared +string table (Open XML SDK)](working-with-the-shared-string-table.md). The following table lists the common Open XML SDK 2.5 classes used when working with the - ``` --------------------------------------------------------------------------------- @@ -344,22 +341,17 @@ own sheet. A package is permitted to contain zero or more Chartsheet parts. -[Example: sheet1.xml refers to a drawing that is the target of a +Example: sheet1.xml refers to a drawing that is the target of a relationship in the Chartsheet part's relationship item: -\ - -    \ - -        \ - -    \ - -    \ - -\ - -end example] +```xml + +     +         +     +     + +``` © ISO/IEC29500: 2008. @@ -403,28 +395,19 @@ A package is permitted to contain one or more Dialogsheet parts The root element for a part of this content type shall be dialogsheet. -[Example: sheet1.xml contains the following: - -\ - -    \ - -        \ - -    \ - -    \ +Example: sheet1.xml contains the following: +```xml + +     +         +     +             … - -    \ - +         … - -    \ - -\ - -end example] +     + +``` © ISO/IEC29500: 2008. diff --git a/docs/working-with-slide-layouts.md b/docs/working-with-slide-layouts.md index bf4c7f1..236881b 100644 --- a/docs/working-with-slide-layouts.md +++ b/docs/working-with-slide-layouts.md @@ -23,8 +23,7 @@ Open XML File Format PresentationML schema. --------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent slide layouts in a PresentationML document as follows: @@ -39,8 +38,7 @@ content should be mapped to the new slide layout. The \ element is the root element of the PresentationML Slide Layout part. For more information about the overall structure of the parts and elements that make up a PresentationML document, see -[Structure of a PresentationML -Document](structure-of-a-presentationml-document.htm). +[Structure of a PresentationML Document](structure-of-a-presentationml-document.md). The following table lists the child elements of the \ element used when working with slide layouts and the Open XML SDK 2.5 @@ -48,15 +46,14 @@ classes that correspond to them. **PresentationML Element**|**Open XML SDK 2.5 Class** ---|--- -|ColorMapOverride -|CommonSlideData -|ExtensionListWithModification -|HeaderFooter -|Timing -|Transition - -The following table from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\|ColorMapOverride +\|CommonSlideData +\|ExtensionListWithModification +\|HeaderFooter +\|Timing +\|Transition + +The following table from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the attributes of the \ element. **Attributes**|**Description** @@ -87,8 +84,7 @@ list. ### ColorMapOverride Class The **ColorMapOverride** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element provides a mechanism with which to override the color @@ -103,8 +99,7 @@ slide, presentation slide, or slide layout. ### CommonSlideData Class The **CommonSlideData** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies a container for the type of slide information @@ -124,8 +119,7 @@ slides. The **ExtensionListWithModification** class corresponds to the \element. The following information from the -[ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the extension list with modification ability @@ -143,8 +137,7 @@ store whether this extension property has been modified. end note] ### HeaderFooter Class The **HeaderFooter** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the header and footer information for a slide. @@ -157,8 +150,7 @@ slide numbering, and custom header and footer text. ### Timing Class The **Timing** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the timing information for handling all @@ -173,8 +165,7 @@ PresentationML framework. ### Transition Class The **Transition** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the kind of slide transition that should be used @@ -221,9 +212,7 @@ class="nolink">Shape class. -------------------------------------------------------------------------------- -The following method from the article [How to: Create -a presentation document by providing a file name (Open XML -SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) adds a new slide +The following method from the article [How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) adds a new slide layout part to an existing presentation and creates an instance of an Open XML SDK 2.5**SlideLayout** class in the new slide layout part. The **SlideLayout** @@ -275,6 +264,7 @@ namespace. return slideLayoutPart1; } ``` + ```vb Private Shared Function CreateSlideLayoutPart(ByVal slidePart1 As SlidePart) As SlideLayoutPart Dim slideLayoutPart1 As SlideLayoutPart = slidePart1.AddNewPart(Of SlideLayoutPart)("rId1") @@ -346,11 +336,8 @@ PresentationML document file referenced in the code. #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) -[How to: Create a Presentation by Providing a File -Name](how-to-create-a-presentation-document-by-providing-a-file-name.htm) +[How to: Create a Presentation by Providing a File Name](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Apply a theme to a presentation (Open XML -SDK)](how-to-apply-a-theme-to-a-presentation.htm) +[How to: Apply a theme to a presentation (Open XML SDK)](how-to-apply-a-theme-to-a-presentation.md) diff --git a/docs/working-with-slide-masters.md b/docs/working-with-slide-masters.md index e8d6c4e..c744e5e 100644 --- a/docs/working-with-slide-masters.md +++ b/docs/working-with-slide-masters.md @@ -23,8 +23,7 @@ Open XML File Format PresentationML schema. --------------------------------------------------------------------------------- -The [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the Open XML PresentationML \ element used to represent slide layouts in a PresentationML document as follows. @@ -45,8 +44,7 @@ transition information for all corresponding presentation slides. The \ element is the root element of the PresentationML Slide Master part. For more information about the overall structure of the parts and elements that make up a PresentationML document, see -[Structure of a PresentationML -Document](structure-of-a-presentationml-document.htm). +[Structure of a PresentationML Document](structure-of-a-presentationml-document.md). The following table lists the child elements of the \ element used when working with slide masters and the Open XML SDK 2.5 @@ -63,8 +61,7 @@ classes that correspond to them. |Transition |TextStyles -The following table from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following table from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification describes the attributes of the \ element. **Attributes**|**Description** @@ -91,8 +88,7 @@ list. ### ColorMapOverride Class The **ColorMapOverride** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element provides a mechanism with which to override the color @@ -107,8 +103,7 @@ slide, presentation slide, or slide layout. ### CommonSlideData Class The **CommonSlideData** class corresponds to -the \ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +the \ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies a container for the type of slide information @@ -128,8 +123,7 @@ slides. The **ExtensionListWithModification** class corresponds to the \element. The following information from the -[ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the extension list with modification ability @@ -147,8 +141,7 @@ store whether this extension property has been modified. end note] ### HeaderFooter Class The **HeaderFooter** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the header and footer information for a slide. @@ -162,8 +155,7 @@ slide numbering, and custom header and footer text. The **SlideLayoutIdList** class corresponds to the \ element. The following information from the -[ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +[ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the existence of the slide layout identification @@ -179,8 +171,7 @@ which it is used. ### Timing Class The **Timing** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the timing information for handling all @@ -195,8 +186,7 @@ PresentationML framework. ### Transition Class The **Transition** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the kind of slide transition that should be used @@ -209,8 +199,7 @@ transition is complete. ### TextStyles Class The **TextStyles** class corresponds to the -\ element. The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +\ element. The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the \ element: This element specifies the text styles within a slide master. Within @@ -219,27 +208,29 @@ and other slide text as well. This element is only for use within the Slide Master and thus sets the text styles for the corresponding presentation slides. -[Example: Consider the case where we would like to specify the title +Example: Consider the case where we would like to specify the title text for a master slide. -\ -    \        \ -            \ -                \ -            \ -            \ -            \ -                \vv -                    \ -                \ -                \ -                \ -                \ -            \ -        \ -    \ -\ +```xml + +     +         +             +                 +             +             +             +                vv +                     +                 +                 +                 +                 +             +         +     + +``` In the above example the title text is set according to the above formatting for all related slides within the presentation. end example] @@ -283,9 +274,7 @@ class="nolink">Shape class. -------------------------------------------------------------------------------- -The following method from the article [How to: Create -a presentation document by providing a file name (Open XML -SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.htm) adds a new slide +The following method from the article [How to: Create a presentation document by providing a file name (Open XML SDK)](how-to-create-a-presentation-document-by-providing-a-file-name.md) adds a new slide master part to an existing presentation and creates an instance of an Open XML SDK 2.5**SlideMaster** class in the new slide master part. The **SlideMaster** @@ -341,6 +330,7 @@ namespace. return slideMasterPart1; } ``` + ```vb Private Shared Function CreateSlideMasterPart(ByVal slideLayoutPart1 As SlideLayoutPart) As SlideMasterPart Dim slideMasterPart1 As SlideMasterPart = slideLayoutPart1.AddNewPart(Of SlideMasterPart)("rId1") @@ -447,14 +437,10 @@ PresentationML document referenced in the code. #### Concepts - [About the Open XML SDK 2.5 for -Office](about-the-open-xml-sdk-2-5.htm) +[About the Open XML SDK 2.5 for Office](about-the-open-xml-sdk-2-5.md) -[How to: Create a Presentation by Providing a File -Name](how-to-create-a-presentation-document-by-providing-a-file-name.htm) +[How to: Create a Presentation by Providing a File Name](how-to-create-a-presentation-document-by-providing-a-file-name.md) - [How to: Insert a new slide into a presentation -(Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.htm) +[How to: Insert a new slide into a presentation (Open XML SDK)](how-to-insert-a-new-slide-into-a-presentation.md) - [How to: Delete a slide from a presentation (Open -XML SDK)](how-to-delete-a-slide-from-a-presentation.htm) +[How to: Delete a slide from a presentation (Open XML SDK)](how-to-delete-a-slide-from-a-presentation.md) diff --git a/docs/working-with-spreadsheetml-documents.md b/docs/working-with-spreadsheetml-documents.md index 799b733..5e9b232 100644 --- a/docs/working-with-spreadsheetml-documents.md +++ b/docs/working-with-spreadsheetml-documents.md @@ -21,26 +21,18 @@ documents. -------------------------------------------------------------------------------- - [Structure of a SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.htm) +[Structure of a SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md) - [Working with the calculation chain (Open XML -SDK)](working-with-the-calculation-chain.htm) +[Working with the calculation chain (Open XML SDK)](working-with-the-calculation-chain.md) - [Working with conditional formatting (Open XML -SDK)](working-with-conditional-formatting.htm) +[Working with conditional formatting (Open XML SDK)](working-with-conditional-formatting.md) - [Working with formulas (Open XML -SDK)](working-with-formulas.htm) +[Working with formulas (Open XML SDK)](working-with-formulas.md) - [Working with PivotTables (Open XML -SDK)](working-with-pivottables.htm) +[Working with PivotTables (Open XML SDK)](working-with-pivottables.md) - [Working with the shared string table (Open XML -SDK)](working-with-the-shared-string-table.htm) +[Working with the shared string table (Open XML SDK)](working-with-the-shared-string-table.md) - [Working with sheets (Open XML -SDK)](working-with-sheets.htm) +[Working with sheets (Open XML SDK)](working-with-sheets.md) - [Working with SpreadsheetML tables (Open XML -SDK)](working-with-tables-1.htm) +[Working with SpreadsheetML tables (Open XML SDK)](working-with-tables-1.md) diff --git a/docs/working-with-tables.md b/docs/working-with-tables.md index caa7d2d..bf16fb1 100644 --- a/docs/working-with-tables.md +++ b/docs/working-with-tables.md @@ -21,13 +21,12 @@ class="nolink">Table class and how it relates to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a SpreadsheetML document, see [Structure of a SpreadsheetML document -(Open XML SDK)](structure-of-a-spreadsheetml-document.htm). +(Open XML SDK)](structure-of-a-spreadsheetml-document.md). -------------------------------------------------------------------------------- -The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the **table** (\<table\>) element. @@ -68,9 +67,7 @@ filtering, formatting and binding of data. Like other constructs in SpreadsheetML, a table in a worksheet is stored in a separate part inside the package. The table part does not contain any table data. The data is maintained in the worksheet cells. For more -information about data is stored in the worksheet, see [Working with sheets (Open XML -SDK)](working-with-sheets.htm). +information about data is stored in the worksheet, see [Working with sheets (Open XML SDK)](working-with-sheets.md). The following table lists the common Open XML SDK 2.5 classes used when working with the **Table** class. @@ -149,28 +146,22 @@ AutoFilter temporarily hides rows based on filter criteria, which is applied column by column to a table of data in the worksheet. This collection expresses AutoFilter settings. -[Example: This example expresses a filter indicating to 'show only +Example: This example expresses a filter indicating to 'show only values greater than 0.5'. The filter is being applied to the range B3:E8, and the criteria is being applied to values in the column whose colId='1' (zero based column numbering, from left to right). Therefore any rows must be hidden if the value in that particular column is less than or equal to 0.5. -\ - -    \ - -        \ - -            \ - -        \ - -    \ - -\ - -end example] +```xml + +     +         +             +         +     + +``` © ISO/IEC29500: 2008. diff --git a/docs/working-with-the-calculation-chain.md b/docs/working-with-the-calculation-chain.md index 95f9ef6..988e02c 100644 --- a/docs/working-with-the-calculation-chain.md +++ b/docs/working-with-the-calculation-chain.md @@ -20,9 +20,7 @@ target="T:DocumentFormat.OpenXml.Spreadsheet.CalculationChain">CalculationChain class and how it relates to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a -SpreadsheetML document, see [Structure of a -SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.htm). +SpreadsheetML document, see [Structure of a SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md). --------------------------------------------------------------------------------- @@ -98,8 +96,7 @@ cell (\<**si**\>) element that represents a cell that contains a formula. The following information from the ISO/IEC 29500 specification -introduces the **CalculationCell** (\<c\>) element. +introduces the **CalculationCell** (\<c\>) element. Every c element represents a cell containing a formula. The first cell calculated appears first (top-tobottom), and so on. The reference @@ -115,46 +112,27 @@ The following information from the ISO/IEC 29500 shows the XML for an example calculation chain after the application performs its first full calculation. -\ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - -    \ - +```xml + +     +     +     +     +     +     +     +     +     +     +     +     +     +     +     +     +     +     +     +     \ +``` \ No newline at end of file diff --git a/docs/working-with-the-shared-string-table.md b/docs/working-with-the-shared-string-table.md index 019ba31..450c2e2 100644 --- a/docs/working-with-the-shared-string-table.md +++ b/docs/working-with-the-shared-string-table.md @@ -20,15 +20,12 @@ target="T:DocumentFormat.OpenXml.Spreadsheet.SharedStringTable">SharedStringTable class and how it relates to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a -SpreadsheetML document, see [Structure of a -SpreadsheetML document (Open XML -SDK)](structure-of-a-spreadsheetml-document.htm). +SpreadsheetML document, see [Structure of a SpreadsheetML document (Open XML SDK)](structure-of-a-spreadsheetml-document.md). -------------------------------------------------------------------------------- -The following information from the [ISO/IEC -29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) +The following information from the [ISO/IEC 29500](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51463) specification introduces the SharedStringTable (\<sst\>) element. @@ -219,9 +216,7 @@ exist, it is added as a shared string item to the shared string table. For more information about how to use the SharedStringTable class to programmatically -insert text into a cell, see [How to: Insert text -into a cell in a spreadsheet document (Open XML -SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.htm). +insert text into a cell, see [How to: Insert text into a cell in a spreadsheet document (Open XML SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.md). ```csharp // Given text and a SharedStringTablePart, creates a SharedStringItem with the specified text @@ -254,6 +249,7 @@ SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.htm). return i; } ``` + ```vb ' Given text and a SharedStringTablePart, creates a SharedStringItem with the specified text ' and inserts it into the SharedStringTablePart. If the item already exists, returns its index. @@ -282,9 +278,7 @@ SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.htm). ``` ### Generated SpreadsheetML -If you run the Open XML SDK 2.5 in the [How to: -Insert text into a cell in a spreadsheet document (Open XML -SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.htm) topic and insert +If you run the Open XML SDK 2.5 in the [How to: Insert text into a cell in a spreadsheet document (Open XML SDK)](how-to-insert-text-into-a-cell-in-a-spreadsheet.md) topic and insert the word "hello" into cell A1, the following XML is written to the "sharedStrings.xml" file in the .zip file of the SpreadsheetML document referenced in the code. diff --git a/docs/working-with-wordprocessingml-documents.md b/docs/working-with-wordprocessingml-documents.md index 9c2450f..b6d103a 100644 --- a/docs/working-with-wordprocessingml-documents.md +++ b/docs/working-with-wordprocessingml-documents.md @@ -21,10 +21,10 @@ WordprocessingML documents. -------------------------------------------------------------------------------- - [Working with paragraphs (Open XML SDK)](working-with-paragraphs.htm) +[Working with paragraphs (Open XML SDK)](working-with-paragraphs.md) - [Working with runs (Open XML SDK)](working-with-runs.htm) +[Working with runs (Open XML SDK)](working-with-runs.md) - [Working with WordprocessingML tables (Open XML SDK)](working-with-tables.htm) +[Working with WordprocessingML tables (Open XML SDK)](working-with-tables.md) - [Structure of a WordprocessingML document (Open XML SDK)](structure-of-a-wordprocessingml-document.htm) +[Structure of a WordprocessingML document (Open XML SDK)](structure-of-a-wordprocessingml-document.md)