บันทึก
Contents
[
Hide
]
แสดงวิธีการเพิ่ม, อ่าน, ลบและอัปเดตสไลด์บันทึกโน้ตโดยใช้ Aspose.Slides for Python via .NET.
เพิ่มสไลด์บันทึกโน้ต
สร้างสไลด์บันทึกโน้ตและกำหนดข้อความให้กับมัน.
def add_note():
with slides.Presentation() as presentation:
slide = presentation.slides[0]
notes_slide = slide.notes_slide_manager.add_notes_slide()
notes_slide.notes_text_frame.text = "My note"
presentation.save("note.pptx", slides.export.SaveFormat.PPTX)
เข้าถึงสไลด์บันทึกโน้ต
อ่านข้อความจากสไลด์บันทึกโน้ตที่มีอยู่.
def access_note():
with slides.Presentation("note.pptx") as presentation:
slide = presentation.slides[0]
notes_slide = slide.notes_slide_manager.notes_slide
notes = notes_slide.notes_text_frame.text
ลบสไลด์บันทึกโน้ต
ลบสไลด์บันทึกโน้ตที่เชื่อมโยงกับสไลด์.
def remove_note():
with slides.Presentation("note.pptx") as presentation:
slide = presentation.slides[0]
# ลบสไลด์บันทึกโน้ต.
slide.notes_slide_manager.remove_notes_slide()
presentation.save("note_removed.pptx", slides.export.SaveFormat.PPTX)
อัปเดตข้อความบันทึกโน้ต
เปลี่ยนข้อความของสไลด์บันทึกโน้ต.
def update_note_text():
with slides.Presentation("note.pptx") as presentation:
slide = presentation.slides[0]
# อัปเดตข้อความบันทึกโน้ต.
slide.notes_slide_manager.notes_slide.notes_text_frame.text = "Updated"
presentation.save("note_updated.pptx", slides.export.SaveFormat.PPTX)