【Microsoft® PowerPoint for Mac】MAC一键导出PPT备注

news/2025/2/25 7:56:21

MAC一键导出PPT备注

  • 1.搜索自动操作
  • 2.点击快速操作
  • 3.搜索并运行`AppleScript`
  • 4.输入代码,并选择只应用于Microsoft PowerPoint for Mac【右上角】
  • 5. CRTL+S保存为“将备注导出为txt”,PPT中应用。

MAC没自带,需要自己配置

1.搜索自动操作

在这里插入图片描述

2.点击快速操作

第一遍可能打不开,可以尝试两次
请添加图片描述

3.搜索并运行AppleScript

请添加图片描述

4.输入代码,并选择只应用于Microsoft PowerPoint for Mac【右上角】

on pptGetAllNote(page_from as integer, page_to as integer)
   set delimit to "--------------------------"
   tell application "Microsoft PowerPoint"
      activate
      set counter to 0
      set total_text to ""
      repeat with slideNumber from page_from to page_to
         set page_text to "(Page " & (slideNumber as text) & ")
"
         tell slide slideNumber of active presentation
            try
               set page_note to content of text range of text frame of place holder 2 of notes page
            on error
               set page_note to "(Error)"
               set counter to counter + 1
            end try
            set page_text to (page_text & page_note & "
" & delimit & "
")
            set total_text to total_text & page_text & "
   
   
"
         end tell
      end repeat
   end tell
   return total_text
end pptGetAllNote

on validateInt(str_number as text)
   try
      set N to str_number as integer
      return {0, N}
   on error number errorNumber
      return {-1, -1}
   end try
end validateInt

on validateInput(page_from_to as text, num_slides as integer)
   set {flag, page_from, page_to} to {-1, -1, -1}
   set oldDelims to my text item delimiters -- save the current delimiters
   set my text item delimiters to {"-", "~", "~"} -- the character to split on
   set num to (count of text items of page_from_to)
   if num = 1 then
      # single page
      set {flag1, page_from} to my validateInt(first text item of page_from_to)
      if flag1 = 0 and page_from > 0 and page_from ≤ num_slides then set {flag, page_to} to {0, page_from}
   else if num = 2 then
      # multiple pages
      set {flag1, page_from} to my validateInt(first text item of page_from_to)
      set {flag2, page_to} to my validateInt(second text item of page_from_to)
      if flag1 = 0 and flag2 = 0 and page_from > 0 and page_from ≤ num_slides and page_from ≤ page_to and page_to > 0 and page_to ≤ num_slides then set flag to 0
   end if
   set my text item delimiters to oldDelims -- just to be safe, restore the old delimiters
   return {flag, page_from, page_to}
end validateInput

on run {input, parameters}
   set userLocale to user locale of (system info)
   
   tell application "Microsoft PowerPoint" -- version: 2019
      set ppt_name to name of active presentation
      set num_slides to count of slides of active presentation
      set cur_page to slide number of slide of view of active window
      if cur_page is missing value then
         set tips to ""
      else
         set tips to "
   [当前页码为 " & cur_page & "]"
      end if
      if num_slides = 1 then
         set default_ans to "1"
      else
         set default_ans to "1-" & (num_slides as text)
      end if
      set page_from_to to the text returned of (display dialog "请输入要处理的 PPT 页码范围" & tips & ":" default answer default_ans with title "提取 PPT 文本框内容" with icon note)
      set {flag, page_from, page_to} to my validateInput(page_from_to, num_slides)
      
      repeat while flag ≠ 0
         set page_from_to to the text returned of (display dialog "请输入要处理的 PPT 页码范围
[请确保页码范围有效]:" default answer default_ans with title "提取 PPT 文本框内容" with icon caution)
         set {flag, page_from, page_to} to my validateInput(page_from_to, num_slides)
      end repeat
   end tell
   
   set content_to_write to pptGetAllNote(page_from, page_to)
   set filename to POSIX path of (((path to desktop folder) as text) & ppt_name & ".txt")
   (*
   tell application "TextEdit"
      activate
      set newDoc to (make new document with properties {text:(content_to_write as Unicode text)})
   end tell
   *)
   do shell script "cat > " & filename & " << 'EOF'
" & content_to_write as Unicode text & "
'EOF'"
   
   set file_path to filename as POSIX file
   tell application "Finder" to open file file_path
end run

请添加图片描述

5. CRTL+S保存为“将备注导出为txt”,PPT中应用。

![请添加图片描述](https://i-blog.csdnimg.cn/direct/17d9dfc416df4b09b71a23af28a5e179.png
参考:
请添加图片描述

https://www.zhihu.com/question/35590265/answer/1193997870


http://www.niftyadmin.cn/n/5865215.html

相关文章

网页制作08-html,css,javascript初认识のhtml使用框架结构,请先建立站点!

框架一般由框架集和框架组成。 框架集就像一个大的容器&#xff0c;包括所有的框架&#xff0c;是框架的集合。 框架是框架集中一个独立的区域用于显示一个独立的网页文档。 框架集是文件html&#xff0c;它定义一组框架的布局和属性&#xff0c;包括框架的数目&#xff0c;框架…

ES6新增的变量

ES6新增了两个变量&#xff0c;一个是let&#xff0c;另一个是const&#xff0c;接下来我们说一说他们的区别&#xff1f; let/const 与 var 的区别&#xff1f; 1.预解析 var会进行预解析 let/const没有预解析&#xff0c;必须先声明后使用 2.重复变量名 var定义的变量可…

如何制作安装包打包软件

实现原理 本质就是将exe所需的所有资源制作为一个自解压文件(SFX)。 打包软件 本体 taurirust做配置界面 打包文件夹界面方式(本地文件-单页面应用/网址)起始界面(资源路径)pip(可新增)install(进度回调)complete(选项设置-快捷方式) 打包自解压 使用rust打包 [ depend…

数据驱动未来!天合光能与永洪科技携手开启数字化新篇章

在信息化时代的今天&#xff0c;企业间的竞争早就超越了传统产品与服务的范畴&#xff0c;新的核心竞争力即——数据处理能力和信息技术的应用。作为数据技术领域的领军者&#xff0c;永洪科技凭借其深厚的技术积累和丰富的行业经验&#xff0c;成功助力天合光能实现数字化升级…

LeetCode 贪心算法经典题目 (C++实现)

121. 买卖股票的最佳时机 题目描述 给定一个数组 prices &#xff0c;它的第 i 个元素 prices[i] 表示一支给定股票第 i 天的价格。 你只能选择 某一天 买入这只股票&#xff0c;并选择在 未来的某一个不同的日子 卖出该股票。设计一个算法来计算你所能获取的最大利润。 返…

可狱可囚的爬虫系列课程 13:Requests使用代理IP

一、什么是代理 IP 代理 IP&#xff08;Proxy IP&#xff09;是一个充当“中间人”的服务器IP地址&#xff0c;用于代替用户设备&#xff08;如电脑、手机等&#xff09;直接与目标网站或服务通信。用户通过代理IP访问互联网时&#xff0c;目标网站看到的是代理服务器的IP地址&…

大厂数据仓库数仓建模面试题及参考答案

目录 什么是数据仓库,和数据库有什么区别? 数据仓库的基本原理是什么? 数据仓库架构是怎样的? 数据仓库分层(层级划分),每层做什么?分层的好处是什么?数据分层是根据什么?数仓分层的原则与思路是什么? 数仓建模常用模型有哪些?区别、优缺点是什么?星型模型和雪…

Spark(2.2)输出重定向,管道运算符与压缩解压

一.输出重定向 二.管道运算符 三.压缩和解压 一.输出重定向 1.覆盖原来的: 命令> echo aaa > a.txt。会把aaa这三个字符写入a.txt文件&#xff0c;并把之前的内容全部覆盖掉&#xff08;等价于先删除了a.txt的内容&#xff0c;再写入aaa。 2.输出重定向&#xff08;…