Skip to content

Commit

Permalink
Merge pull request #34 from Venkateshmuruganandam/master
Browse files Browse the repository at this point in the history
Sample added for First slide number
  • Loading branch information
MohanaselvamJothi authored Nov 10, 2023
2 parents 11ca743 + b82381e commit d388e24
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
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 not shown.
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>
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);
}
}
}
}
}
}

0 comments on commit d388e24

Please sign in to comment.