C# .NET을 사용하여 PowerPoint에서 업데이트 추가 및 슬라이드 노트 제거 읽기

PowerPoint 프레젠테이션의 슬라이드 노트는 발표자가 프레젠테이션 중 중요한 사항을 기억할 수 있도록 참조를 추가하는 데 사용됩니다. 이 메모는 PowerPoint 프레젠테이션의 모든 슬라이드에 추가할 수 있습니다. 이 문서에서는 또한 프로그래밍 방식으로 프레젠테이션의 슬라이드 노트를 처리하는 몇 가지 중요한 측면을 다룹니다.

이 기사를 읽고 나면 다음을 수행할 수 있습니다.

.NET용 Aspose.Slides를 사용하여 슬라이드 노트 작업

PowerPoint에서 슬라이드 노트로 작업하기 위해 프레젠테이션 문서 생성, 업데이트, 구문 분석 및 변환을 지원하는 강력한 PowerPoint 자동화 API인 .NET용 Aspose.Slides를 사용합니다. API를 다운로드하거나 다음 옵션을 사용하여 설치할 수 있습니다.

NuGet 패키지 관리자 사용

PowerPoint C# .NET에서 슬라이드 노트 읽기 또는 업데이트

패키지 관리자 콘솔 사용

PM> Install-Package Aspose.Slides.NET

C#의 PowerPoint 프레젠테이션에서 슬라이드 노트 읽기

PowerPoint에서 슬라이드 노트에 액세스하기 위해 Aspose.Slides for .NET은 INotesSlideManager 인터페이스를 제공합니다. INotesSlideManager를 사용하면 슬라이드 노트에 액세스하고, 읽고, 추가하고, 업데이트할 수 있습니다. 다음은 PowerPoint 프레젠테이션에서 슬라이드 노트를 읽는 단계입니다.

다음 코드 샘플은 C#을 사용하여 PowerPoint PPTX에서 슬라이드 노트를 읽는 방법을 보여줍니다.

// PowerPoint 프레젠테이션 로드
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// 슬라이드 노트 읽기
INotesSlide note = mgr.NotesSlide;
Console.Write(note.NotesTextFrame.Text);

C#에서 PowerPoint 슬라이드에 메모 추가

다음은 PowerPoint 프레젠테이션의 특정 슬라이드에 메모를 추가하는 단계입니다.

  • 프레젠테이션 개체에 PowerPoint 프레젠테이션을 로드합니다.
  • 특정 슬라이드의 NotesSlideManager에 액세스합니다.
  • INotesSlide 인터페이스를 사용하여 새 메모를 추가합니다.
  • Presentation.Save(String, SaveFormat) 메서드를 사용하여 프레젠테이션을 저장합니다.

다음 코드 샘플은 C#을 사용하여 PowerPoint PPTX에 슬라이드 노트를 추가하는 방법을 보여줍니다.

// PowerPoint 프레젠테이션 로드
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// 새 슬라이드 노트 추가
INotesSlide note = mgr.AddNotesSlide();
note.NotesTextFrame.Text = "new slide note";
// 프레젠테이션 저장
presentation.Save("added-slide-notes.pptx", SaveFormat.Pptx);

C#을 사용하여 PowerPoint 프레젠테이션에서 슬라이드 노트 업데이트

특정 프레젠테이션 슬라이드의 메모를 업데이트하려면 메모를 읽을 때와 동일한 방식으로 NotesSlide에 액세스합니다. 슬라이드 노트에 액세스하면 INotesSlide.NotesTextFrame.Text 속성을 사용하여 텍스트를 간단히 업데이트할 수 있습니다. 완료되면 Presentation.Save(String, SaveFormat) 메서드를 사용하여 프레젠테이션 파일을 저장합니다.

다음 코드 샘플은 C#을 사용하여 PowerPoint 프레젠테이션에서 슬라이드 노트를 업데이트하는 방법을 보여줍니다.

// PowerPoint 프레젠테이션 로드
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// 슬라이드 노트에 액세스
INotesSlide note = mgr.NotesSlide;
// 슬라이드 노트의 텍스트 업데이트 
note.NotesTextFrame.Text = "this is updated note";
// 프레젠테이션 저장
presentation.Save("updated-slide-notes.pptx", SaveFormat.Pptx);

C#을 사용하여 PowerPoint 프레젠테이션에서 슬라이드 노트 제거

PowerPoint 프레젠테이션에서 슬라이드 노트를 제거하려면 INotesSlideManager.RemoveNotesSlide() 메서드를 호출하고 프레젠테이션 파일을 저장하면 됩니다. 다음 코드 샘플은 C#을 사용하여 PowerPoint 프레젠테이션에서 슬라이드 노트를 제거하는 방법을 보여줍니다.

// PowerPoint 프레젠테이션 로드
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// 슬라이드 노트 제거
mgr.RemoveNotesSlide();
// 프레젠테이션 저장
presentation.Save("removed-slide-notes.pptx", SaveFormat.Pptx);

또한보십시오

.NET용 Aspose.Slides를 무료로 사용해 보세요.

무료 임시 라이선스를 사용하여 .NET용 Aspose.Slides를 사용해 볼 수 있습니다.