-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from Venkateshmuruganandam/master
Sample added for First slide number
- Loading branch information
Showing
4 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
PowerPoint-Presentation/First-slide-number/.NET/First-slide-number.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.7.34031.279 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "First-slide-number", "First-slide-number\First-slide-number.csproj", "{6E9287CA-43CB-4C94-85A3-7B22F59E0C08}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6E9287CA-43CB-4C94-85A3-7B22F59E0C08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6E9287CA-43CB-4C94-85A3-7B22F59E0C08}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6E9287CA-43CB-4C94-85A3-7B22F59E0C08}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6E9287CA-43CB-4C94-85A3-7B22F59E0C08}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {D7208A33-F675-405F-8629-B00963892131} | ||
EndGlobalSection | ||
EndGlobal |
Binary file added
BIN
+130 KB
PowerPoint-Presentation/First-slide-number/.NET/First-slide-number/Data/Input.pptx
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
PowerPoint-Presentation/First-slide-number/.NET/First-slide-number/First-slide-number.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<RootNamespace>First_slide_number</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Presentation.Net.Core" Version="*" /> | ||
</ItemGroup> | ||
|
||
</Project> |
32 changes: 32 additions & 0 deletions
32
PowerPoint-Presentation/First-slide-number/.NET/First-slide-number/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
| ||
using Syncfusion.Presentation; | ||
using System; | ||
using System.ComponentModel; | ||
|
||
namespace First_slide_number | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
//Open an existing PowerPoint Presentation. | ||
using (FileStream inputStream = new FileStream("../../../Data/Input.pptx", FileMode.Open)) | ||
{ | ||
using (IPresentation pptxDoc = Presentation.Open("../../../Data/Input.pptx")) | ||
{ | ||
//Get the FirstSlideNumber of Presentation. | ||
int firstSlideNumber = pptxDoc.FirstSlideNumber; | ||
|
||
//Modify the value for FirstSlideNumber. | ||
pptxDoc.FirstSlideNumber = 10; | ||
|
||
//Save the PowerPoint Presentation as stream. | ||
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create)) | ||
{ | ||
pptxDoc.Save(outputStream); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |