From 0331f072c9bfcdab9fa259db91dec1ec3f399f6b Mon Sep 17 00:00:00 2001 From: Konduru Keerthi Konduru Ravichandra Raju Date: Fri, 30 Aug 2024 15:44:18 +0530 Subject: [PATCH 1/3] Macros --- .../Load-and-save-macro-PowerPoint.csproj | 9 +++++++++ .../.NET/Load-and-save-macro-PowerPoint/Output/.gitkeep | 0 .../.NET/Load-and-save-macro-PowerPoint/Program.cs | 4 ++-- Macros/Remove-macros/.NET/Remove-macros/Output/.gitkeep | 0 Macros/Remove-macros/.NET/Remove-macros/Program.cs | 4 ++-- .../.NET/Remove-macros/Remove-macros.csproj | 9 +++++++++ 6 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Output/.gitkeep create mode 100644 Macros/Remove-macros/.NET/Remove-macros/Output/.gitkeep diff --git a/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Load-and-save-macro-PowerPoint.csproj b/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Load-and-save-macro-PowerPoint.csproj index 19c3817b..9fa373d0 100644 --- a/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Load-and-save-macro-PowerPoint.csproj +++ b/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Load-and-save-macro-PowerPoint.csproj @@ -12,4 +12,13 @@ + + + Always + + + Always + + + diff --git a/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Output/.gitkeep b/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Program.cs b/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Program.cs index f5332007..f4a4dafa 100644 --- a/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Program.cs +++ b/Macros/Load-and-save-macro-PowerPoint/.NET/Load-and-save-macro-PowerPoint/Program.cs @@ -1,7 +1,7 @@ using Syncfusion.Presentation; //Load or open an PowerPoint Presentation. -using FileStream inputStream = new(Path.GetFullPath(@"../../../Data/Template.pptm"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); +using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptm"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); //Open an existing PowerPoint presentation. using IPresentation pptxDoc = Presentation.Open(inputStream); //Add a blank slide to the presentation. @@ -9,5 +9,5 @@ //Add a text box to the slide. IParagraph paragraph = slide.Shapes.AddTextBox(100, 100, 300, 80).TextBody.AddParagraph("Preserve Macros"); //Save the PowerPoint Presentation as stream. -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptm"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptm"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Macros/Remove-macros/.NET/Remove-macros/Output/.gitkeep b/Macros/Remove-macros/.NET/Remove-macros/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Macros/Remove-macros/.NET/Remove-macros/Program.cs b/Macros/Remove-macros/.NET/Remove-macros/Program.cs index 41fc4c77..08cca90d 100644 --- a/Macros/Remove-macros/.NET/Remove-macros/Program.cs +++ b/Macros/Remove-macros/.NET/Remove-macros/Program.cs @@ -1,12 +1,12 @@ using Syncfusion.Presentation; //Load or open an PowerPoint Presentation. -using FileStream inputStream = new(Path.GetFullPath(@"../../../Data/Template.pptm"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); +using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptm"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); //Open an existing PowerPoint presentation. using IPresentation pptxDoc = Presentation.Open(inputStream); //Check whether the presentation has macros and then removes them. if (pptxDoc.HasMacros) pptxDoc.RemoveMacros(); //Save the PowerPoint Presentation as stream. -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Macros/Remove-macros/.NET/Remove-macros/Remove-macros.csproj b/Macros/Remove-macros/.NET/Remove-macros/Remove-macros.csproj index b9ad70c1..486767ac 100644 --- a/Macros/Remove-macros/.NET/Remove-macros/Remove-macros.csproj +++ b/Macros/Remove-macros/.NET/Remove-macros/Remove-macros.csproj @@ -12,4 +12,13 @@ + + + Always + + + Always + + + From e125073d27a31a6bd2f114d079edfc6a75a6edee Mon Sep 17 00:00:00 2001 From: Konduru Keerthi Konduru Ravichandra Raju Date: Fri, 30 Aug 2024 15:49:59 +0530 Subject: [PATCH 2/3] Master and Layout Slides --- .../Access-PowerPoint-master-slide.csproj | 6 ++++++ .../.NET/Access-PowerPoint-master-slide/Output/.gitkeep | 0 .../.NET/Access-PowerPoint-master-slide/Program.cs | 2 +- .../Create-custom-layout-slide.csproj | 6 ++++++ .../.NET/Create-custom-layout-slide/Output/.gitkeep | 0 .../.NET/Create-custom-layout-slide/Program.cs | 2 +- .../Modify-PowerPoint-master-slide-background.csproj | 6 ++++++ .../Output/.gitkeep | 0 .../Modify-PowerPoint-master-slide-background/Program.cs | 2 +- 9 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Output/.gitkeep create mode 100644 Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Output/.gitkeep create mode 100644 Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Output/.gitkeep diff --git a/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Access-PowerPoint-master-slide.csproj b/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Access-PowerPoint-master-slide.csproj index b8d05cc3..af2d2cd3 100644 --- a/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Access-PowerPoint-master-slide.csproj +++ b/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Access-PowerPoint-master-slide.csproj @@ -12,4 +12,10 @@ + + + Always + + + diff --git a/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Output/.gitkeep b/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Program.cs b/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Program.cs index 95de3b39..c3855524 100644 --- a/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Program.cs +++ b/Master-and-Layout-slides/Access-PowerPoint-master-slide/.NET/Access-PowerPoint-master-slide/Program.cs @@ -7,5 +7,5 @@ //Get the first shape name from the master slide. string shapeName = masterSlide.Shapes[0].ShapeName; //Save the PowerPoint Presentation as stream. -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Create-custom-layout-slide.csproj b/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Create-custom-layout-slide.csproj index 87c8487a..09fe7e4d 100644 --- a/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Create-custom-layout-slide.csproj +++ b/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Create-custom-layout-slide.csproj @@ -12,4 +12,10 @@ + + + Always + + + diff --git a/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Output/.gitkeep b/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Program.cs b/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Program.cs index a5cf7b29..d46c99e2 100644 --- a/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Program.cs +++ b/Master-and-Layout-slides/Create-custom-layout-slide/.NET/Create-custom-layout-slide/Program.cs @@ -9,5 +9,5 @@ //Change the background color for LayoutSlide. layoutSlide.Background.Fill.SolidFill.Color = ColorObject.FromArgb(78, 89, 90); //Save the PowerPoint Presentation as stream. -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Modify-PowerPoint-master-slide-background.csproj b/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Modify-PowerPoint-master-slide-background.csproj index 0276b291..9fc07cc8 100644 --- a/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Modify-PowerPoint-master-slide-background.csproj +++ b/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Modify-PowerPoint-master-slide-background.csproj @@ -12,4 +12,10 @@ + + + Always + + + diff --git a/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Output/.gitkeep b/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Program.cs b/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Program.cs index 11c86570..d157b2ad 100644 --- a/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Program.cs +++ b/Master-and-Layout-slides/Modify-PowerPoint-master-slide-background/.NET/Modify-PowerPoint-master-slide-background/Program.cs @@ -13,5 +13,5 @@ //Set the color for solid fill object. solidFill.Color = ColorObject.Green; //Save the PowerPoint Presentation as stream. -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file From bab30d4c22fbbff8c56b8fdd1777915ef0a551ca Mon Sep 17 00:00:00 2001 From: Konduru Keerthi Konduru Ravichandra Raju Date: Fri, 30 Aug 2024 18:23:45 +0530 Subject: [PATCH 3/3] Notes --- .../Add-notes-to-PowerPoint-slide.csproj | 6 ++++++ .../.NET/Add-notes-to-PowerPoint-slide/Output/.gitkeep | 0 .../.NET/Add-notes-to-PowerPoint-slide/Program.cs | 2 +- .../.NET/Add-text-in-notes/Add-text-in-notes.csproj | 6 ++++++ .../.NET/Add-text-in-notes/Output/.gitkeep | 0 .../Add-text-in-notes/.NET/Add-text-in-notes/Program.cs | 2 +- .../Create-numbered-list-in-notes-slide.csproj | 6 ++++++ .../Create-numbered-list-in-notes-slide/Output/.gitkeep | 0 .../.NET/Create-numbered-list-in-notes-slide/Program.cs | 2 +- .../.NET/Remove-notes-from-slide/Output/.gitkeep | 0 .../.NET/Remove-notes-from-slide/Program.cs | 4 ++-- .../Remove-notes-from-slide.csproj | 9 +++++++++ 12 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Output/.gitkeep create mode 100644 Notes/Add-text-in-notes/.NET/Add-text-in-notes/Output/.gitkeep create mode 100644 Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Output/.gitkeep create mode 100644 Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Output/.gitkeep diff --git a/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Add-notes-to-PowerPoint-slide.csproj b/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Add-notes-to-PowerPoint-slide.csproj index 05cef033..bab18896 100644 --- a/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Add-notes-to-PowerPoint-slide.csproj +++ b/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Add-notes-to-PowerPoint-slide.csproj @@ -12,4 +12,10 @@ + + + Always + + + diff --git a/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Output/.gitkeep b/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Program.cs b/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Program.cs index d2acf981..48fb6d2e 100644 --- a/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Program.cs +++ b/Notes/Add-notes-to-PowerPoint-slide/.NET/Add-notes-to-PowerPoint-slide/Program.cs @@ -8,5 +8,5 @@ INotesSlide notesSlide = slide.AddNotesSlide(); //Add text content into the Notes Slide. notesSlide.NotesTextBody.AddParagraph("Notes content"); -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Add-text-in-notes.csproj b/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Add-text-in-notes.csproj index 369b05e0..588af17e 100644 --- a/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Add-text-in-notes.csproj +++ b/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Add-text-in-notes.csproj @@ -12,4 +12,10 @@ + + + Always + + + diff --git a/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Output/.gitkeep b/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Program.cs b/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Program.cs index 0b42d188..cd1500bb 100644 --- a/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Program.cs +++ b/Notes/Add-text-in-notes/.NET/Add-text-in-notes/Program.cs @@ -17,5 +17,5 @@ textPart.Font.FontName = "Times New Roman"; //Set text content size using FontSize property. textPart.Font.FontSize = 20; -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Create-numbered-list-in-notes-slide.csproj b/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Create-numbered-list-in-notes-slide.csproj index fc8cc5ff..5b942715 100644 --- a/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Create-numbered-list-in-notes-slide.csproj +++ b/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Create-numbered-list-in-notes-slide.csproj @@ -12,4 +12,10 @@ + + + Always + + + diff --git a/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Output/.gitkeep b/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Program.cs b/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Program.cs index 6b6added..4fc10432 100644 --- a/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Program.cs +++ b/Notes/Create-numbered-list-in-notes-slide/.NET/Create-numbered-list-in-notes-slide/Program.cs @@ -45,5 +45,5 @@ //Set the bullet character size. Here, 100 means 100% of its text. Possible values can range from 25 to 400. paragraph.ListFormat.Size = 100; //Save the PowerPoint Presentation as stream. -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Output/.gitkeep b/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Program.cs b/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Program.cs index 102c586e..efe4af4e 100644 --- a/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Program.cs +++ b/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Program.cs @@ -1,7 +1,7 @@ using Syncfusion.Presentation; //Load or open an PowerPoint Presentation. -using FileStream inputStream = new(Path.GetFullPath(@"../../../Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); +using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); //Open an existing PowerPoint presentation. using IPresentation pptxDoc = Presentation.Open(inputStream); //Get instance of the first slide from the Presentation. @@ -9,5 +9,5 @@ //Remove Notes Slide from a corresponding slide. slide.RemoveNotesSlide(); //Save the PowerPoint Presentation as stream. -using FileStream outputStream = new(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); pptxDoc.Save(outputStream); \ No newline at end of file diff --git a/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Remove-notes-from-slide.csproj b/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Remove-notes-from-slide.csproj index 7bf4523d..4ee32f6e 100644 --- a/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Remove-notes-from-slide.csproj +++ b/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Remove-notes-from-slide.csproj @@ -12,4 +12,13 @@ + + + Always + + + Always + + +