diff --git a/docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md b/docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md new file mode 100644 index 0000000..8ea4ea4 --- /dev/null +++ b/docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md @@ -0,0 +1,138 @@ +--- + +api_name: +- Microsoft.Office.DocumentFormat.OpenXML.Packaging +api_type: +- schema +ms.assetid: 536c94b5-dd25-4173-ad6a-b72b95dd7f31 +title: 'How to: Add a video to a slide in a presentation' +ms.suite: office + +ms.author: o365devx +author: o365devx +ms.topic: conceptual +ms.date: 04/03/2025 +ms.localizationpriority: medium +--- + +# Add a video to a slide in a presentation + +This topic shows how to use the classes in the Open XML SDK for +Office to add a video to the first slide in a presentation +programmatically. + +## Getting a Presentation Object + +In the Open XML SDK, the class represents a +presentation document package. To work with a presentation document, +first create an instance of the **PresentationDocument** class, and then work with +that instance. To create the class instance from the document call the + method that uses a file path, and a +Boolean value as the second parameter to specify whether a document is +editable. To open a document for read/write, specify the value `true` for this parameter as shown in the following +`using` statement. In this code, the file +parameter is a string that represents the path for the file from which +you want to open the document. + +### [C#](#tab/cs-1) +[!code-csharp[](../../samples/presentation/add_video/cs/Program.cs#snippet1)] + +### [Visual Basic](#tab/vb-1) +[!code-vb[](../../samples/presentation/add_video/vb/Program.vb#snippet1)] +*** + + +[!include[Using Statement](../includes/presentation/using-statement.md)] `ppt`. + + +## The Structure of the Video From File + +The PresentationML document consists of a number of parts, among which is the Picture (``) element. + +The following text from the [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] specification introduces the overall form of a `PresentationML` package. + +Video File (``) specifies the presence of a video file. It is defined within the non-visual properties of an object. The video shall be attached to an object as this is how it is represented within the document. The actual playing of the video however is done within the timing node list that is specified under the timing element. + +Consider the following `Picture` object that has a video attached to it. + +```xml + + + + + + + + + + + + + +``` + +In the above example, we see that there is a single videoFile element attached to this picture. This picture is placed within the document just as a normal picture or shape would be. The id of this picture, namely 7 in this case, is used to refer to this videoFile element from within the timing node list. The Linked relationship id is used to retrieve the actual video file for playback purposes. + +© [!include[ISO/IEC 29500 version](../includes/iso-iec-29500-version.md)] + +The following XML Schema fragment defines the contents of videoFile. + +```xml + + + + + + +``` + +## How the Sample Code Works + +After opening the presentation file for read/write access in the `using` statement, the code gets the presentation +part from the presentation document. Then it gets the relationship ID of +the last slide, and gets the slide part from the relationship ID. + + +### [C#](#tab/cs-2) +[!code-csharp[](../../samples/presentation/add_video/cs/Program.cs#snippet2)] + +### [Visual Basic](#tab/vb-2) +[!code-vb[](../../samples/presentation/add_video/vb/Program.vb#snippet2)] +*** + +The code first creates a media data part for the video file to be added. With the video file stream open, it feeds the media data part object. Next, video and media relationship references are added to the slide using the provided embedId for future reference to the video file and mediaEmbedId for media reference. + +An image part is then added with a sample picture to be used as a placeholder for the video. A picture object is created with various elements, such as Non-Visual Drawing Properties (``), which specify non-visual canvas properties. This allows for additional information that does not affect the appearance of the picture to be stored. The `` element, explained above, is also included. The HyperLinkOnClick (``) element specifies the on-click hyperlink information to be applied to a run of text or image. When the hyperlink text or image is clicked, the link is fetched. Non-Visual Picture Drawing Properties (``) specify the non-visual properties for the picture canvas. For a detailed explanation of the elements used, please refer to [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] + +### [C#](#tab/cs-3) +[!code-csharp[](../../samples/presentation/add_video/cs/Program.cs#snippet3)] + +### [Visual Basic](#tab/vb-3) +[!code-vb[](../../samples/presentation/add_video/vb/Program.vb#snippet3)] +*** + +Next Media(CT_Media) element is created with use of previously referenced mediaEmbedId(Embedded Picture Reference). The Blip element is also added; this element specifies the existence of an image (binary large image or picture) and contains a reference to the image data. Blip's Embed attribute is used to specify a placeholder image in the Image Part created previously. + +### [C#](#tab/cs-4) +[!code-csharp[](../../samples/presentation/add_video/cs/Program.cs#snippet4)] + +### [Visual Basic](#tab/vb-4) +[!code-vb[](../../samples/presentation/add_video/vb/Program.vb#snippet4)] +*** + +All other elements such Offset(``), Stretch(``), FillRectangle(``), are appended to the ShapeProperties(``) and ShapeProperties are appended to the Picture element(``). Finally the picture element that incudes video is added to the ShapeTree(``) of the slide. + +Following is the complete sample code that you can use to add video to the slide. + +## Sample Code + +### [C#](#tab/cs) +[!code-csharp[](../../samples/presentation/add_video/cs/Program.cs#snippet0)] + +### [Visual Basic](#tab/vb) +[!code-vb[](../../samples/presentation/add_video/vb/Program.vb#snippet0)] +*** + +## See also + +- [Open XML SDK class library reference](/office/open-xml/open-xml-sdk) diff --git a/docs/presentation/how-to-add-transitions-between-slides-in-a-presentation.md b/docs/presentation/how-to-add-transitions-between-slides-in-a-presentation.md new file mode 100644 index 0000000..2f230ba --- /dev/null +++ b/docs/presentation/how-to-add-transitions-between-slides-in-a-presentation.md @@ -0,0 +1,133 @@ +--- + +api_name: +- Microsoft.Office.DocumentFormat.OpenXML.Packaging +api_type: +- schema +ms.assetid: 5471f369-ad02-41c3-a5d3-ebaf618d185a +title: 'How to: Add transitions between slides in a presentation' +ms.suite: office + +ms.author: o365devx +author: o365devx +ms.topic: conceptual +ms.date: 04/03/2025 +ms.localizationpriority: medium +--- + +# Add Transitions between slides in a presentation + +This topic shows how to use the classes in the Open XML SDK to +add transition between all slides in a presentation programmatically. + +## Getting a Presentation Object + +In the Open XML SDK, the class represents a +presentation document package. To work with a presentation document, +first create an instance of the `PresentationDocument` class, and then work with +that instance. To create the class instance from the document, call the + method, that uses a file path, and a +Boolean value as the second parameter to specify whether a document is +editable. To open a document for read/write, specify the value `true` for this parameter as shown in the following +`using` statement. In this code, the file parameter, is a string that represents the path for the file from which you want to open the document. + +### [C#](#tab/cs-1) +[!code-csharp[](../../samples/presentation/add_transition/cs/Program.cs#snippet1)] + +### [Visual Basic](#tab/vb-1) +[!code-vb[](../../samples/presentation/add_transition/vb/Program.vb#snippet1)] +*** + +[!include[Using Statement](../includes/presentation/using-statement.md)] `ppt`. + +## The Structure of the Transition + +Transition element `` specifies the kind of slide transition that should be used to transition to the current slide from the +previous slide. That is, the transition information is stored on the slide that appears after the transition is +complete. + +The following table lists the attributes of the Transition along +with the description of each. + +| Attribute | Description | +|---|---| +| advClick (Advance on Click) | Specifies whether a mouse click advances the slide or not. If this attribute is not specified then a value of true is assumed. | +| advTm (Advance after time) | Specifies the time, in milliseconds, after which the transition should start. This setting can be used in conjunction with the advClick attribute. If this attribute is not specified then it is assumed that no auto-advance occurs. | +| spd (Transition Speed) |Specifies the transition speed that is to be used when transitioning from the current slide to the next. | + +[*Example*: Consider the following example + +```xml + + + +``` +In the above example, the transition speed `` is set to slow (available options: slow, med, fast). Advance on Click `` is set to true, and Advance after time `` is set to 3000 milliseconds. The Random Bar child element `` describes the randomBar slide transition effect, which uses a set of randomly placed horizontal `` or vertical `` bars on the slide that continue to be added until the new slide is fully shown. *end example*] + +A full list of Transition's child elements can be viewed here: + +## The Structure of the Alternate Content + +Office Open XML defines a mechanism for the storage of content that is not defined by the ISO/IEC 29500 Office Open XML specification, such as extensions developed by future software applications that leverage the Office Open XML formats. This mechanism allows for the storage of a series of alternative representations of content, from which the consuming application can use the first alternative whose requirements are met. + +Consider an application that creates a new transition object intended to specify the duration of the transition. This functionality is not defined in the Office Open XML specification. Using an AlternateContent block as follows allows specifying the duration `` in milliseconds. + +[*Example*: +```xml + + + + + + + + + + + + +``` + +The Choice element in the above example requires the attribute to specify the duration of the transition, and the Fallback element allows clients that do not support this namespace to see an appropriate alternative representation. *end example*] + +More details on the P14 class can be found here: + +## How the Sample Code Works ## +After opening the presentation file for read/write access in the using statement, the code gets the presentation part from the presentation document. Then, it retrieves the relationship IDs of all slides in the presentation and gets the slides part from the relationship ID. The code then checks if there are no existing transitions set on the slides and replaces them with a new RandomBarTransition. + +### [C#](#tab/cs-2) +[!code-csharp[](../../samples/presentation/add_transition/cs/Program.cs#snippet2)] + +### [Visual Basic](#tab/vb-2) +[!code-vb[](../../samples/presentation/add_transition/vb/Program.vb#snippet2)] +*** + +If there are currently no transitions on the slide, code creates new transition. In both cases as a fallback transition, +RandomBarTransition is used but without `P14:dur`(duration) to allow grater support for clients that aren't supporting this namespace + +### [C#](#tab/cs-3) +[!code-csharp[](../../samples/presentation/add_transition/cs/Program.cs#snippet3)] + +### [Visual Basic](#tab/vb-3) +[!code-vb[](../../samples/presentation/add_transition/vb/Program.vb#snippet3)] +*** + +## Sample Code + +Following is the complete sample code that you can use to add RandomBarTransition to all slides. + +### [C#](#tab/cs) +[!code-csharp[](../../samples/presentation/add_transition/cs/Program.cs#snippet0)] + +### [Visual Basic](#tab/vb) +[!code-vb[](../../samples/presentation/add_transition/vb/Program.vb#snippet0)] +*** + +## See also + +- [Open XML SDK class library reference](/office/open-xml/open-xml-sdk) + + + + diff --git a/docs/presentation/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md b/docs/presentation/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentation.md similarity index 100% rename from docs/presentation/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md rename to docs/presentation/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentation.md diff --git a/docs/presentation/overview.md b/docs/presentation/overview.md index f2dbeb7..d223d2e 100644 --- a/docs/presentation/overview.md +++ b/docs/presentation/overview.md @@ -20,8 +20,11 @@ This section provides how-to topics for working with presentation documents usin ## In this section -- [Structure of a PresentationML document](structure-of-a-presentationml-document.md) +- [Structure of a PresentationML document](structure-of-a-presentationml-document.md) + +- [Add an audio file to a slide in a presentation](how-to-add-an-audio-to-a-slide-in-a-presentation.md) + - [Add a comment to a slide in a presentation](how-to-add-a-comment-to-a-slide-in-a-presentation.md) - [Apply a theme to a presentation](how-to-apply-a-theme-to-a-presentation.md) @@ -30,7 +33,7 @@ This section provides how-to topics for working with presentation documents usin - [Create a presentation document by providing a file name](how-to-create-a-presentation-document-by-providing-a-file-name.md) -- [Delete all the comments by an author from all the slides in a presentation](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md) +- [Delete all the comments by an author from all the slides in a presentation](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentation.md) - [Delete a slide from a presentation](how-to-delete-a-slide-from-a-presentation.md) @@ -40,7 +43,7 @@ This section provides how-to topics for working with presentation documents usin - [Get all the text in all slides in a presentation](how-to-get-all-the-text-in-all-slides-in-a-presentation.md) -- [Get the titles of all the slides in a presentation](how-to-get-the-titles-of-all-the-slides-in-a-presentation.md) +- [Get the titles of all the slides in a presentation](how-to-get-the-titles-of-all-the-slides-in-a-presentation.md) - [Insert a new slide into a presentation](how-to-insert-a-new-slide-into-a-presentation.md) @@ -50,7 +53,9 @@ This section provides how-to topics for working with presentation documents usin - [Open a presentation document for read-only access](how-to-open-a-presentation-document-for-read-only-access.md) -- [Retrieve the number of slides in a presentation document](how-to-retrieve-the-number-of-slides-in-a-presentation-document.md) +- [Retrieve the number of slides in a presentation document](how-to-retrieve-the-number-of-slides-in-a-presentation-document.md) + +- [Add a transition to a slides in a presentation](how-to-add-transitions-between-slides-in-a-presentation.md) - [Working with animation](working-with-animation.md) diff --git a/docs/presentation/working-with-comments.md b/docs/presentation/working-with-comments.md index 19b5e81..9b8b040 100644 --- a/docs/presentation/working-with-comments.md +++ b/docs/presentation/working-with-comments.md @@ -193,4 +193,4 @@ article. [About the Open XML SDK for Office](../about-the-open-xml-sdk.md) [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](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](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md) +[How to: Delete all the comments by an author from all the slides in a presentation](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentation.md) diff --git a/docs/spreadsheet/overview.md b/docs/spreadsheet/overview.md index 30791b7..b3808c3 100644 --- a/docs/spreadsheet/overview.md +++ b/docs/spreadsheet/overview.md @@ -23,22 +23,12 @@ This section provides how-to topics for working with spreadsheet documents using - [Structure of a SpreadsheetML document](structure-of-a-spreadsheetml-document.md) -- [Working with the calculation chain](working-with-the-calculation-chain.md) - -- [Working with conditional formatting](working-with-conditional-formatting.md) - -- [Working with formulas](working-with-formulas.md) - -- [Working with PivotTables](working-with-pivottables.md) - -- [Working with the shared string table](working-with-the-shared-string-table.md) - -- [Working with sheets](working-with-sheets.md) - -- [Working with SpreadsheetML tables](working-with-tables.md) +- [Add custom UI to a spreadsheet document](how-to-add-custom-ui-to-a-spreadsheet-document.md) - [Calculate the sum of a range of cells in a spreadsheet document](how-to-calculate-the-sum-of-a-range-of-cells-in-a-spreadsheet-document.md) +- [Copy a Worksheet Using SAX (Simple API for XML)](how-to-copy-a-worksheet-with-sax.md) + - [Create a spreadsheet document by providing a file name](how-to-create-a-spreadsheet-document-by-providing-a-file-name.md) - [Delete text from a cell in a spreadsheet document](how-to-delete-text-from-a-cell-in-a-spreadsheet.md) @@ -69,6 +59,21 @@ This section provides how-to topics for working with spreadsheet documents using - [Retrieve the values of cells in a spreadsheet document](how-to-retrieve-the-values-of-cells-in-a-spreadsheet.md) +- [Retrieve a list of the worksheets in a spreadsheet document](how-to-retrieve-a-list-of-the-worksheets-in-a-spreadsheet.md) + +- [Working with the calculation chain](working-with-the-calculation-chain.md) + +- [Working with conditional formatting](working-with-conditional-formatting.md) + +- [Working with formulas](working-with-formulas.md) + +- [Working with PivotTables](working-with-pivottables.md) + +- [Working with the shared string table](working-with-the-shared-string-table.md) + +- [Working with sheets](working-with-sheets.md) + +- [Working with SpreadsheetML tables](working-with-tables.md) ## Related sections diff --git a/docs/toc.yml b/docs/toc.yml index 3f6f46f..e21f4f2 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -48,6 +48,8 @@ href: presentation/how-to-add-an-audio-to-a-slide-in-a-presentation.md - name: Add a comment to a slide in a presentation href: presentation/how-to-add-a-comment-to-a-slide-in-a-presentation.md + - name: Add a video to a slide in a presentation + href: presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md - name: Apply a theme to a presentation href: presentation/how-to-apply-a-theme-to-a-presentation.md - name: Change the fill color of a shape in a presentation @@ -55,7 +57,7 @@ - name: Create a presentation document by providing a file name href: presentation/how-to-create-a-presentation-document-by-providing-a-file-name.md - name: Delete all the comments by an author from all the slides in a presentation - href: presentation/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md + href: presentation/how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentation.md - name: Delete a slide from a presentation href: presentation/how-to-delete-a-slide-from-a-presentation.md - name: Get all the external hyperlinks in a presentation @@ -78,6 +80,8 @@ href: presentation/how-to-retrieve-the-number-of-slides-in-a-presentation-document.md - name: Structure of a PresentationML document href: presentation/structure-of-a-presentationml-document.md + - name: Add a transition to a slide in a presentation + href: presentation/how-to-add-transitions-between-slides-in-a-presentation.md - name: Working with animation href: presentation/working-with-animation.md - name: Working with comments diff --git a/docs/word/overview.md b/docs/word/overview.md index 26cf33b..d4eb1ae 100644 --- a/docs/word/overview.md +++ b/docs/word/overview.md @@ -21,6 +21,8 @@ This section provides how-to topics for working with word processing documents u ## In this section +- [Structure of a WordprocessingML document](structure-of-a-wordprocessingml-document.md) + - [Accept all revisions in a word processing document](how-to-accept-all-revisions-in-a-word-processing-document.md) - [Add tables to word processing documents](how-to-add-tables-to-word-processing-documents.md) @@ -59,13 +61,15 @@ This section provides how-to topics for working with word processing documents u - [Remove the headers and footers from a word processing document](how-to-remove-the-headers-and-footers-from-a-word-processing-document.md) +- [How to: Replace Text in a Word Document Using SAX (Simple API for XML)](how-to-replace-text-in-a-word-document-with-sax.md) + - [Replace the header in a word processing document](how-to-replace-the-header-in-a-word-processing-document.md) -- [Replace the styles parts in a word processing document](how-to-replace-the-styles-parts-in-a-word-processing-document.md) +- [Replace the styles parts in a word processing document](how-to-replace-the-styles-parts-in-a-word-processing-document.md) -- [Retrieve comments from a word processing document](how-to-retrieve-comments-from-a-word-processing-document.md) +- [Retrieve application property values from a Word document by using the Open XML API](how-to-retrieve-application-property-values-from-a-word-processing-document.md) -- [Retrieve property values from a Word document by using the Open XML API](how-to-retrieve-application-property-values-from-a-word-processing-document.md) +- [Retrieve comments from a word processing document](how-to-retrieve-comments-from-a-word-processing-document.md) - [Set a custom property in a word processing document](how-to-set-a-custom-property-in-a-word-processing-document.md) @@ -78,8 +82,7 @@ This section provides how-to topics for working with word processing documents u - [Working with runs](working-with-runs.md) - [Working with WordprocessingML tables](working-with-wordprocessingml-tables.md) - -- [Structure of a WordprocessingML document](structure-of-a-wordprocessingml-document.md) + ## Related sections diff --git a/samples/README.md b/samples/README.md index 814cd58..2e34f5f 100644 --- a/samples/README.md +++ b/samples/README.md @@ -10,13 +10,27 @@ To add a sample, run the the following: This will create an initial scaffold for a sample and add it to the solution file. +## Steps to Complete Before Creating a Pull Request: +1. **Test Both Code Samples** +Verify the functionality of both the C# and Visual Basic samples. To accelerate the process, you can use Copilot to translate the C# sample into Visual Basic. When writing code samples, avoid using var; instead, explicitly declare variable types. + +2. **Validate Documentation with DocFX** +Use the https://dotnet.github.io/docfx/ to ensure the generated documentation renders correctly and behaves as expected. + +3. **Update the Table of Contents** +Add a new entry to the toc.yml file so the content appears in the Navigation Pane on the Microsoft Learn website. + +4. **Edit the Overview Page** +Update the overview.md file with the new title and markdown file reference to ensure it appears in the overview section on Microsoft Learn. This file is located in one of the following directories: docs/presentation, docs/spreadsheet, or docs/word. + + ## Migrate old samples ```powershell ./migrate-sample.ps1 path-to-md-file ``` -This will do an inital extraction and clean up of the file, as well as add the code to the solution. Additional clean up will be necessary, but should be minimal. +This will do an initial extraction and clean up of the file, as well as add the code to the solution. Additional clean up will be necessary, but should be minimal. General changes to move a sample: diff --git a/samples/presentation/add_transition/cs/Program.cs b/samples/presentation/add_transition/cs/Program.cs new file mode 100644 index 0000000..497473e --- /dev/null +++ b/samples/presentation/add_transition/cs/Program.cs @@ -0,0 +1,119 @@ +using DocumentFormat.OpenXml; +using DocumentFormat.OpenXml.Presentation; +using DocumentFormat.OpenXml.Packaging; +using System.Collections.Generic; +using System.Linq; +using System; + +// +AddTransmitionToSlides(args[0]); +static void AddTransmitionToSlides(string filePath) +{ + // + using (PresentationDocument presentationDocument = PresentationDocument.Open(filePath, true)) + // + { + + // Check if the presentation part and slide list are available + if (presentationDocument.PresentationPart == null || presentationDocument.PresentationPart.Presentation.SlideIdList == null) + { + throw new NullReferenceException("Presentation part is empty or there are no slides"); + } + + // Get the presentation part + PresentationPart presentationPart = presentationDocument.PresentationPart; + + // Get the list of slide IDs + OpenXmlElementList slidesIds = presentationPart.Presentation.SlideIdList.ChildElements; + + // + // Define the transition start time and duration in milliseconds + string startTransitionAfterMs = "3000", durationMs = "2000"; + + // Set to true if you want to advance to the next slide on mouse click + bool advanceOnClick = true; + + // Iterate through each slide ID to get slides parts + foreach (SlideId slideId in slidesIds) + { + // Get the relationship ID of the slide + string? relId = slideId!.RelationshipId!.ToString(); + + if (relId == null) + { + throw new NullReferenceException("RelationshipId not found"); + } + + // Get the slide part using the relationship ID + SlidePart? slidePart = (SlidePart)presentationDocument.PresentationPart.GetPartById(relId); + + // Remove existing transitions if any + if (slidePart.Slide.Transition != null) + { + slidePart.Slide.Transition.Remove(); + } + + // Check if there are any AlternateContent elements + if (slidePart!.Slide.Descendants().ToList().Count > 0) + { + // Get all AlternateContent elements + List alternateContents = [.. slidePart.Slide.Descendants()]; + foreach (AlternateContent alternateContent in alternateContents) + { + // Remove transitions in AlternateContentChoice within AlternateContent + List childElements = alternateContent.ChildElements.ToList(); + + foreach (OpenXmlElement element in childElements) + { + List transitions = element.Descendants().ToList(); + foreach (Transition transition in transitions) + { + transition.Remove(); + } + } + // Add new transitions to AlternateContentChoice and AlternateContentFallback + alternateContent!.GetFirstChild(); + Transition choiceTransition = new Transition(new RandomBarTransition()) { Duration = durationMs, AdvanceAfterTime = startTransitionAfterMs, AdvanceOnClick = advanceOnClick, Speed = TransitionSpeedValues.Slow }; + Transition fallbackTransition = new Transition(new RandomBarTransition()) {AdvanceAfterTime = startTransitionAfterMs, AdvanceOnClick = advanceOnClick, Speed = TransitionSpeedValues.Slow }; + alternateContent!.GetFirstChild()!.Append(choiceTransition); + alternateContent!.GetFirstChild()!.Append(fallbackTransition); + } + } + // + + // + // Add transition if there is none + else + { + // Check if there is a transition appended to the slide and set it to null + if (slidePart.Slide.Transition != null) + { + slidePart.Slide.Transition = null; + } + // Create a new AlternateContent element + AlternateContent alternateContent = new AlternateContent(); + alternateContent.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); + + // Create a new AlternateContentChoice element and add the transition + AlternateContentChoice alternateContentChoice = new AlternateContentChoice() { Requires = "p14" }; + Transition choiceTransition = new Transition(new RandomBarTransition()) { Duration = durationMs, AdvanceAfterTime = startTransitionAfterMs, AdvanceOnClick = advanceOnClick, Speed = TransitionSpeedValues.Slow }; + Transition fallbackTransition = new Transition(new RandomBarTransition()) { AdvanceAfterTime = startTransitionAfterMs, AdvanceOnClick = advanceOnClick, Speed = TransitionSpeedValues.Slow }; + alternateContentChoice.Append(choiceTransition); + + // Create a new AlternateContentFallback element and add the transition + AlternateContentFallback alternateContentFallback = new AlternateContentFallback(fallbackTransition); + alternateContentFallback.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); + alternateContentFallback.AddNamespaceDeclaration("p16", "http://schemas.microsoft.com/office/powerpoint/2015/main"); + alternateContentFallback.AddNamespaceDeclaration("adec", "http://schemas.microsoft.com/office/drawing/2017/decorative"); + alternateContentFallback.AddNamespaceDeclaration("a16", "http://schemas.microsoft.com/office/drawing/2014/main"); + + // Append the AlternateContentChoice and AlternateContentFallback to the AlternateContent + alternateContent.Append(alternateContentChoice); + alternateContent.Append(alternateContentFallback); + slidePart.Slide.Append(alternateContent); + } + // + } + } +} +// diff --git a/samples/presentation/add_transition/cs/add_transition_cs.csproj b/samples/presentation/add_transition/cs/add_transition_cs.csproj new file mode 100644 index 0000000..1364b24 --- /dev/null +++ b/samples/presentation/add_transition/cs/add_transition_cs.csproj @@ -0,0 +1 @@ + diff --git a/samples/presentation/add_transition/vb/Program.vb b/samples/presentation/add_transition/vb/Program.vb new file mode 100644 index 0000000..30a1b8c --- /dev/null +++ b/samples/presentation/add_transition/vb/Program.vb @@ -0,0 +1,126 @@ +Imports DocumentFormat.OpenXml +Imports DocumentFormat.OpenXml.Packaging +Imports DocumentFormat.OpenXml.Presentation + +Module Program + Sub Main(args As String()) + AddTransmitionToSlides(args(0)) + End Sub + + ' + Sub AddTransmitionToSlides(filePath As String) + ' + Using presentationDocument As PresentationDocument = PresentationDocument.Open(filePath, True) + ' + ' Check if the presentation part and slide list are available + If presentationDocument.PresentationPart Is Nothing OrElse presentationDocument.PresentationPart.Presentation.SlideIdList Is Nothing Then + Throw New NullReferenceException("Presentation part is empty or there are no slides") + End If + + ' Get the presentation part + Dim presentationPart As PresentationPart = presentationDocument.PresentationPart + + ' Get the list of slide IDs + Dim slidesIds As OpenXmlElementList = presentationPart.Presentation.SlideIdList.ChildElements + + ' + ' Define the transition start time and duration in milliseconds + Dim startTransitionAfterMs As String = "3000" + Dim durationMs As String = "2000" + + ' Set to true if you want to advance to the next slide on mouse click + Dim advanceOnClick As Boolean = True + + ' Iterate through each slide ID to get slides parts + For Each slideId As SlideId In slidesIds + ' Get the relationship ID of the slide + Dim relId As String = slideId.RelationshipId.ToString() + + If relId Is Nothing Then + Throw New NullReferenceException("RelationshipId not found") + End If + + ' Get the slide part using the relationship ID + Dim slidePart As SlidePart = CType(presentationDocument.PresentationPart.GetPartById(relId), SlidePart) + + ' Remove existing transitions if any + If slidePart.Slide.Transition IsNot Nothing Then + slidePart.Slide.Transition.Remove() + End If + + ' Check if there are any AlternateContent elements + If slidePart.Slide.Descendants(Of AlternateContent)().ToList().Count > 0 Then + ' Get all AlternateContent elements + Dim alternateContents As List(Of AlternateContent) = slidePart.Slide.Descendants(Of AlternateContent)().ToList() + For Each alternateContent In alternateContents + ' Remove transitions in AlternateContentChoice within AlternateContent + Dim childElements As List(Of OpenXmlElement) = alternateContent.ChildElements.ToList() + + For Each element In childElements + Dim transitions As List(Of Transition) = element.Descendants(Of Transition)().ToList() + For Each transition In transitions + transition.Remove() + Next + Next + ' Add new transitions to AlternateContentChoice and AlternateContentFallback + alternateContent.GetFirstChild(Of AlternateContentChoice)() + Dim choiceTransition = New Transition(New RandomBarTransition()) With { + .Duration = durationMs, + .AdvanceAfterTime = startTransitionAfterMs, + .AdvanceOnClick = advanceOnClick, + .Speed = TransitionSpeedValues.Slow} + Dim fallbackTransition = New Transition(New RandomBarTransition()) With { + .AdvanceAfterTime = startTransitionAfterMs, + .AdvanceOnClick = advanceOnClick, + .Speed = TransitionSpeedValues.Slow} + alternateContent.GetFirstChild(Of AlternateContentChoice)().Append(choiceTransition) + alternateContent.GetFirstChild(Of AlternateContentFallback)().Append(fallbackTransition) + Next + ' + ' + ' Add transition if there is none + Else + ' Check if there is a transition appended to the slide and set it to null + If slidePart.Slide.Transition IsNot Nothing Then + slidePart.Slide.Transition = Nothing + End If + + ' Create a new AlternateContent element + Dim alternateContent As New AlternateContent() + alternateContent.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006") + + ' Create a new AlternateContentChoice element and add the transition + Dim alternateContentChoice As New AlternateContentChoice() With { + .Requires = "p14" + } + Dim choiceTransition = New Transition(New RandomBarTransition()) With { + .Duration = durationMs, + .AdvanceAfterTime = startTransitionAfterMs, + .AdvanceOnClick = advanceOnClick, + .Speed = TransitionSpeedValues.Slow} + alternateContentChoice.Append(choiceTransition) + + ' Create a new AlternateContentFallback element and add the transition + Dim fallbackTransition = New Transition(New RandomBarTransition()) With { + .AdvanceAfterTime = startTransitionAfterMs, + .AdvanceOnClick = advanceOnClick, + .Speed = TransitionSpeedValues.Slow} + Dim alternateContentFallback As New AlternateContentFallback(fallbackTransition) + + alternateContentFallback.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main") + alternateContentFallback.AddNamespaceDeclaration("p16", "http://schemas.microsoft.com/office/powerpoint/2015/main") + alternateContentFallback.AddNamespaceDeclaration("adec", "http://schemas.microsoft.com/office/drawing/2017/decorative") + alternateContentFallback.AddNamespaceDeclaration("a16", "http://schemas.microsoft.com/office/drawing/2014/main") + + ' Append the AlternateContentChoice and AlternateContentFallback to the AlternateContent + alternateContent.Append(alternateContentChoice) + alternateContent.Append(alternateContentFallback) + slidePart.Slide.Append(alternateContent) + End If + ' + Next + End Using + End Sub + +End Module +' diff --git a/samples/presentation/add_transition/vb/add_transition_vb.vbproj b/samples/presentation/add_transition/vb/add_transition_vb.vbproj new file mode 100644 index 0000000..1364b24 --- /dev/null +++ b/samples/presentation/add_transition/vb/add_transition_vb.vbproj @@ -0,0 +1 @@ + diff --git a/samples/presentation/add_video/cs/Program.cs b/samples/presentation/add_video/cs/Program.cs new file mode 100644 index 0000000..f03c883 --- /dev/null +++ b/samples/presentation/add_video/cs/Program.cs @@ -0,0 +1,150 @@ +using DocumentFormat.OpenXml; +using DocumentFormat.OpenXml.Presentation; +using A = DocumentFormat.OpenXml.Drawing; +using P14 = DocumentFormat.OpenXml.Office2010.PowerPoint; +using ShapeTree = DocumentFormat.OpenXml.Presentation.ShapeTree; +using ShapeProperties = DocumentFormat.OpenXml.Presentation.ShapeProperties; +using NonVisualDrawingProperties = DocumentFormat.OpenXml.Presentation.NonVisualDrawingProperties; +using NonVisualPictureProperties = DocumentFormat.OpenXml.Presentation.NonVisualPictureProperties; +using NonVisualPictureDrawingProperties = DocumentFormat.OpenXml.Presentation.NonVisualPictureDrawingProperties; +using Picture = DocumentFormat.OpenXml.Presentation.Picture; +using BlipFill = DocumentFormat.OpenXml.Presentation.BlipFill; +using DocumentFormat.OpenXml.Packaging; +using ApplicationNonVisualDrawingProperties = DocumentFormat.OpenXml.Presentation.ApplicationNonVisualDrawingProperties; +using System; +using System.IO; +using System.Linq; + +// +AddVideo(args[0], args[1], args[2]); + +static void AddVideo(string filePath, string videoFilePath, string coverPicPath) +{ + + string imgEmbedId = "rId4", embedId = "rId3", mediaEmbedId = "rId2"; + UInt32Value shapeId = 5; + // + using (PresentationDocument presentationDocument = PresentationDocument.Open(filePath, true)) + // + { + + if (presentationDocument.PresentationPart == null || presentationDocument.PresentationPart.Presentation.SlideIdList == null) + { + throw new NullReferenceException("Presentation Part is empty or there are no slides in it"); + } + // + //Get presentation part + PresentationPart presentationPart = presentationDocument.PresentationPart; + + //Get slides ids. + OpenXmlElementList slidesIds = presentationPart.Presentation.SlideIdList.ChildElements; + + //Get relationsipId of the last slide + string? videoSldRelationshipId = ((SlideId) slidesIds[slidesIds.ToArray().Length - 1]).RelationshipId; + + if (videoSldRelationshipId == null) + { + throw new NullReferenceException("Slide id not found"); + } + + //Get slide part by relationshipID + SlidePart? slidePart = (SlidePart) presentationPart.GetPartById(videoSldRelationshipId); + // + + // + // Create video Media Data Part (content type, extension) + MediaDataPart mediaDataPart = presentationDocument.CreateMediaDataPart("video/mp4", ".mp4"); + + //Get the video file and feed the stream + using (Stream mediaDataPartStream = File.OpenRead(videoFilePath)) + { + mediaDataPart.FeedData(mediaDataPartStream); + } + //Adds a VideoReferenceRelationship to the MainDocumentPart + slidePart.AddVideoReferenceRelationship(mediaDataPart, embedId); + + //Adds a MediaReferenceRelationship to the SlideLayoutPart + slidePart.AddMediaReferenceRelationship(mediaDataPart, mediaEmbedId); + + NonVisualDrawingProperties nonVisualDrawingProperties = new NonVisualDrawingProperties() { Id = shapeId, Name = "video" }; + A.VideoFromFile videoFromFile = new A.VideoFromFile() { Link = embedId }; + + ApplicationNonVisualDrawingProperties appNonVisualDrawingProperties = new ApplicationNonVisualDrawingProperties(); + appNonVisualDrawingProperties.Append(videoFromFile); + + //adds sample image to the slide with id to be used as reference in blip + ImagePart imagePart = slidePart.AddImagePart(ImagePartType.Png, imgEmbedId); + using (Stream data = File.OpenRead(coverPicPath)) + { + imagePart.FeedData(data); + } + + if (slidePart!.Slide!.CommonSlideData!.ShapeTree == null) + { + throw new NullReferenceException("Presentation shape tree is empty"); + } + + //Getting existing shape tree object from PowerPoint + ShapeTree shapeTree = slidePart.Slide.CommonSlideData.ShapeTree; + + // specifies the existence of a picture within a presentation. + // It can have non-visual properties, a picture fill as well as shape properties attached to it. + Picture picture = new Picture(); + NonVisualPictureProperties nonVisualPictureProperties = new NonVisualPictureProperties(); + + A.HyperlinkOnClick hyperlinkOnClick = new A.HyperlinkOnClick() { Id = "", Action = "ppaction://media" }; + nonVisualDrawingProperties.Append(hyperlinkOnClick); + + NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties = new NonVisualPictureDrawingProperties(); + A.PictureLocks pictureLocks = new A.PictureLocks() { NoChangeAspect = true }; + nonVisualPictureDrawingProperties.Append(pictureLocks); + + ApplicationNonVisualDrawingPropertiesExtensionList appNonVisualDrawingPropertiesExtensionList = new ApplicationNonVisualDrawingPropertiesExtensionList(); + ApplicationNonVisualDrawingPropertiesExtension appNonVisualDrawingPropertiesExtension = new ApplicationNonVisualDrawingPropertiesExtension() { Uri = "{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}" }; + // + + // + P14.Media media = new() { Embed = mediaEmbedId }; + media.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); + + appNonVisualDrawingPropertiesExtension.Append(media); + appNonVisualDrawingPropertiesExtensionList.Append(appNonVisualDrawingPropertiesExtension); + appNonVisualDrawingProperties.Append(appNonVisualDrawingPropertiesExtensionList); + + nonVisualPictureProperties.Append(nonVisualDrawingProperties); + nonVisualPictureProperties.Append(nonVisualPictureDrawingProperties); + nonVisualPictureProperties.Append(appNonVisualDrawingProperties); + + //Prepare shape properties to display picture + BlipFill blipFill = new BlipFill(); + A.Blip blip = new A.Blip() { Embed = imgEmbedId }; + // + + A.Stretch stretch = new A.Stretch(); + A.FillRectangle fillRectangle = new A.FillRectangle(); + A.Transform2D transform2D = new A.Transform2D(); + A.Offset offset = new A.Offset() { X = 1524000L, Y = 857250L }; + A.Extents extents = new A.Extents() { Cx = 9144000L, Cy = 5143500L }; + A.PresetGeometry presetGeometry = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle }; + A.AdjustValueList adjValueList = new A.AdjustValueList(); + + stretch.Append(fillRectangle); + blipFill.Append(blip); + blipFill.Append(stretch); + transform2D.Append(offset); + transform2D.Append(extents); + presetGeometry.Append(adjValueList); + + ShapeProperties shapeProperties = new ShapeProperties(); + shapeProperties.Append(transform2D); + shapeProperties.Append(presetGeometry); + + //adds all elements to the slide's shape tree + picture.Append(nonVisualPictureProperties); + picture.Append(blipFill); + picture.Append(shapeProperties); + + shapeTree.Append(picture); + } +} +// \ No newline at end of file diff --git a/samples/presentation/add_video/cs/add_video_cs.csproj b/samples/presentation/add_video/cs/add_video_cs.csproj new file mode 100644 index 0000000..e43252b --- /dev/null +++ b/samples/presentation/add_video/cs/add_video_cs.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samples/presentation/add_video/vb/Program.vb b/samples/presentation/add_video/vb/Program.vb new file mode 100644 index 0000000..dc44b10 --- /dev/null +++ b/samples/presentation/add_video/vb/Program.vb @@ -0,0 +1,165 @@ +Imports DocumentFormat.OpenXml +Imports DocumentFormat.OpenXml.Presentation +Imports A = DocumentFormat.OpenXml.Drawing +Imports P14 = DocumentFormat.OpenXml.Office2010.PowerPoint +Imports ShapeTree = DocumentFormat.OpenXml.Presentation.ShapeTree +Imports ShapeProperties = DocumentFormat.OpenXml.Presentation.ShapeProperties +Imports NonVisualDrawingProperties = DocumentFormat.OpenXml.Presentation.NonVisualDrawingProperties +Imports NonVisualPictureProperties = DocumentFormat.OpenXml.Presentation.NonVisualPictureProperties +Imports NonVisualPictureDrawingProperties = DocumentFormat.OpenXml.Presentation.NonVisualPictureDrawingProperties +Imports Picture = DocumentFormat.OpenXml.Presentation.Picture +Imports BlipFill = DocumentFormat.OpenXml.Presentation.BlipFill +Imports DocumentFormat.OpenXml.Packaging +Imports ApplicationNonVisualDrawingProperties = DocumentFormat.OpenXml.Presentation.ApplicationNonVisualDrawingProperties +Imports System.IO +' +Module Program + Sub Main(args As String()) + AddVideo(args(0), args(1), args(2)) + End Sub + + Sub AddVideo(filePath As String, videoFilePath As String, coverPicPath As String) + Dim imgEmbedId As String = "rId4" + Dim embedId As String = "rId3" + Dim mediaEmbedId As String = "rId2" + Dim shapeId As UInt32Value = 5 + ' + Using presentationDocument As PresentationDocument = PresentationDocument.Open(filePath, True) + ' + If presentationDocument.PresentationPart Is Nothing OrElse presentationDocument.PresentationPart.Presentation.SlideIdList Is Nothing Then + Throw New NullReferenceException("Presentation Part is empty or there are no slides in it") + End If + ' + ' Get presentation part + Dim presentationPart As PresentationPart = presentationDocument.PresentationPart + + ' Get slides ids + Dim slidesIds As OpenXmlElementList = presentationPart.Presentation.SlideIdList.ChildElements + + ' Get relationshipId of the last slide + Dim videoSldRelationshipId As String = CType(slidesIds(slidesIds.ToArray().Length - 1), SlideId).RelationshipId + + If videoSldRelationshipId Is Nothing Then + Throw New NullReferenceException("Slide id not found") + End If + + ' Get slide part by relationshipID + Dim slidePart As SlidePart = CType(presentationPart.GetPartById(videoSldRelationshipId), SlidePart) + ' + ' + ' Create video Media Data Part (content type, extension) + Dim mediaDataPart As MediaDataPart = presentationDocument.CreateMediaDataPart("video/mp4", ".mp4") + + ' Get the video file and feed the stream + Using mediaDataPartStream As Stream = File.OpenRead(videoFilePath) + mediaDataPart.FeedData(mediaDataPartStream) + End Using + + ' Adds a VideoReferenceRelationship to the MainDocumentPart + slidePart.AddVideoReferenceRelationship(mediaDataPart, embedId) + + ' Adds a MediaReferenceRelationship to the SlideLayoutPart + slidePart.AddMediaReferenceRelationship(mediaDataPart, mediaEmbedId) + + Dim nonVisualDrawingProperties As New NonVisualDrawingProperties() With { + .Id = shapeId, + .Name = "video" + } + Dim videoFromFile As New A.VideoFromFile() With { + .Link = embedId + } + + Dim appNonVisualDrawingProperties As New ApplicationNonVisualDrawingProperties() + appNonVisualDrawingProperties.Append(videoFromFile) + + ' Adds sample image to the slide with id to be used as reference in blip + Dim imagePart As ImagePart = slidePart.AddImagePart(ImagePartType.Png, imgEmbedId) + Using data As Stream = File.OpenRead(coverPicPath) + imagePart.FeedData(data) + End Using + + If slidePart.Slide.CommonSlideData.ShapeTree Is Nothing Then + Throw New NullReferenceException("Presentation shape tree is empty") + End If + + ' Getting existing shape tree object from PowerPoint + Dim shapeTree As ShapeTree = slidePart.Slide.CommonSlideData.ShapeTree + + ' Specifies the existence of a picture within a presentation + Dim picture As New Picture() + Dim nonVisualPictureProperties As New NonVisualPictureProperties() + + Dim hyperlinkOnClick As New A.HyperlinkOnClick() With { + .Id = "", + .Action = "ppaction://media" + } + nonVisualDrawingProperties.Append(hyperlinkOnClick) + + Dim nonVisualPictureDrawingProperties As New NonVisualPictureDrawingProperties() + Dim pictureLocks As New A.PictureLocks() With { + .NoChangeAspect = True + } + nonVisualPictureDrawingProperties.Append(pictureLocks) + + Dim appNonVisualDrawingPropertiesExtensionList As New ApplicationNonVisualDrawingPropertiesExtensionList() + Dim appNonVisualDrawingPropertiesExtension As New ApplicationNonVisualDrawingPropertiesExtension() With { + .Uri = "{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}" + } + ' + ' + Dim media As New P14.Media() With { + .Embed = mediaEmbedId + } + media.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main") + + appNonVisualDrawingPropertiesExtension.Append(media) + appNonVisualDrawingPropertiesExtensionList.Append(appNonVisualDrawingPropertiesExtension) + appNonVisualDrawingProperties.Append(appNonVisualDrawingPropertiesExtensionList) + + nonVisualPictureProperties.Append(nonVisualDrawingProperties) + nonVisualPictureProperties.Append(nonVisualPictureDrawingProperties) + nonVisualPictureProperties.Append(appNonVisualDrawingProperties) + + ' Prepare shape properties to display picture + Dim blipFill As New BlipFill() + Dim blip As New A.Blip() With { + .Embed = imgEmbedId + } + ' + Dim stretch As New A.Stretch() + Dim fillRectangle As New A.FillRectangle() + Dim transform2D As New A.Transform2D() + Dim offset As New A.Offset() With { + .X = 1524000L, + .Y = 857250L + } + Dim extents As New A.Extents() With { + .Cx = 9144000L, + .Cy = 5143500L + } + Dim presetGeometry As New A.PresetGeometry() With { + .Preset = A.ShapeTypeValues.Rectangle + } + Dim adjValueList As New A.AdjustValueList() + + stretch.Append(fillRectangle) + blipFill.Append(blip) + blipFill.Append(stretch) + transform2D.Append(offset) + transform2D.Append(extents) + presetGeometry.Append(adjValueList) + + Dim shapeProperties As New ShapeProperties() + shapeProperties.Append(transform2D) + shapeProperties.Append(presetGeometry) + + ' Adds all elements to the slide's shape tree + picture.Append(nonVisualPictureProperties) + picture.Append(blipFill) + picture.Append(shapeProperties) + + shapeTree.Append(picture) + End Using + End Sub +End Module +' \ No newline at end of file diff --git a/samples/presentation/add_video/vb/add_video_vb.vbproj b/samples/presentation/add_video/vb/add_video_vb.vbproj new file mode 100644 index 0000000..e43252b --- /dev/null +++ b/samples/presentation/add_video/vb/add_video_vb.vbproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/samples/samples.sln b/samples/samples.sln index cb7cc7d..5aadc44 100644 --- a/samples/samples.sln +++ b/samples/samples.sln @@ -320,6 +320,9 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "working_with_tables_vb", "w EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "insert_a_picture_vb", "word\insert_a_picture\vb\insert_a_picture_vb.vbproj", "{6170C4E1-A109-435A-BF59-026C85B3BD9C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "add_transition_cs", "presentation\add_transition\cs\add_transition_cs.csproj", "{F61C7360-EB1B-4AF1-BD0D-257CAF122223}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "add_transition_vb", "presentation\add_transition\vb\add_transition_vb.vbproj", "{58E15219-2772-42DC-8BB3-628811289B0F}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "add_audio_cs", "presentation\add_audio\cs\add_audio_cs.csproj", "{2BBA1942-8180-4435-A0A5-22811CC923FA}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "add_audio_vb", "presentation\add_audio\vb\add_audio_vb.vbproj", "{3327770E-D643-470A-88C7-9FE9483D2F43}" @@ -2172,10 +2175,42 @@ Global {6170C4E1-A109-435A-BF59-026C85B3BD9C}.Debug|x86.Build.0 = Debug|Any CPU {6170C4E1-A109-435A-BF59-026C85B3BD9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6170C4E1-A109-435A-BF59-026C85B3BD9C}.Release|Any CPU.Build.0 = Release|Any CPU + {9350E344-D11D-4496-9092-9BA18FC65175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9350E344-D11D-4496-9092-9BA18FC65175}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9350E344-D11D-4496-9092-9BA18FC65175}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9350E344-D11D-4496-9092-9BA18FC65175}.Release|Any CPU.Build.0 = Release|Any CPU + {437E22AF-37F2-4D91-B508-2317AD5368BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {437E22AF-37F2-4D91-B508-2317AD5368BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {437E22AF-37F2-4D91-B508-2317AD5368BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {437E22AF-37F2-4D91-B508-2317AD5368BE}.Release|Any CPU.Build.0 = Release|Any CPU {6170C4E1-A109-435A-BF59-026C85B3BD9C}.Release|x64.ActiveCfg = Release|Any CPU {6170C4E1-A109-435A-BF59-026C85B3BD9C}.Release|x64.Build.0 = Release|Any CPU {6170C4E1-A109-435A-BF59-026C85B3BD9C}.Release|x86.ActiveCfg = Release|Any CPU {6170C4E1-A109-435A-BF59-026C85B3BD9C}.Release|x86.Build.0 = Release|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Debug|x64.ActiveCfg = Debug|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Debug|x64.Build.0 = Debug|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Debug|x86.ActiveCfg = Debug|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Debug|x86.Build.0 = Debug|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Release|Any CPU.Build.0 = Release|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Release|x64.ActiveCfg = Release|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Release|x64.Build.0 = Release|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Release|x86.ActiveCfg = Release|Any CPU + {F61C7360-EB1B-4AF1-BD0D-257CAF122223}.Release|x86.Build.0 = Release|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Debug|x64.ActiveCfg = Debug|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Debug|x64.Build.0 = Debug|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Debug|x86.ActiveCfg = Debug|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Debug|x86.Build.0 = Debug|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Release|Any CPU.Build.0 = Release|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Release|x64.ActiveCfg = Release|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Release|x64.Build.0 = Release|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Release|x86.ActiveCfg = Release|Any CPU + {58E15219-2772-42DC-8BB3-628811289B0F}.Release|x86.Build.0 = Release|Any CPU {2BBA1942-8180-4435-A0A5-22811CC923FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BBA1942-8180-4435-A0A5-22811CC923FA}.Debug|Any CPU.Build.0 = Debug|Any CPU {2BBA1942-8180-4435-A0A5-22811CC923FA}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -2374,6 +2409,8 @@ Global {A43A75AB-D6B6-4D31-99F7-6951AFEF502D} = {D207D3D7-FD4D-4FD4-A7D0-79A82086FB6F} {4EB1FCC9-E1E2-4D2A-ACF9-A3A31AA947A5} = {D207D3D7-FD4D-4FD4-A7D0-79A82086FB6F} {6170C4E1-A109-435A-BF59-026C85B3BD9C} = {D207D3D7-FD4D-4FD4-A7D0-79A82086FB6F} + {F61C7360-EB1B-4AF1-BD0D-257CAF122223} = {CDB9D4A6-7A7A-4CDF-A7A3-4F17F5F1602D} + {58E15219-2772-42DC-8BB3-628811289B0F} = {CDB9D4A6-7A7A-4CDF-A7A3-4F17F5F1602D} {2BBA1942-8180-4435-A0A5-22811CC923FA} = {CDB9D4A6-7A7A-4CDF-A7A3-4F17F5F1602D} {3327770E-D643-470A-88C7-9FE9483D2F43} = {CDB9D4A6-7A7A-4CDF-A7A3-4F17F5F1602D} {0AA6B9DD-2A2C-0E96-1052-6F4AC44B3F5D} = {7ACDC26B-C774-4004-8553-87E862D1E71F}