当前位置:首页教育技巧ppt技巧PPT制作

幻灯片演示文稿(PPT)里的“宏”是干什么用的

减小字体 增大字体 2025-12-05 10:29:52


1.幻灯片演示文稿(PPT)里的“宏”是干什么用的

宏就是一个偷懒的命令 编好一个宏以后可以1步解决很多繁琐的设置 宏可以在所有PPT中使用 前提要保存好 给你一个简单的宏 Sub 批量替换() Dim ChangedCount As Integer Dim FileName As String, Mask As String Dim FindCount As Long Dim CurPresentation As Presentation Dim Path As String, FindString As String, ReplaceString As String Dim oSld As Slide Dim oShp As Shape Dim oTxtRng As TextRange Dim oTmpRng As TextRange Path = InputBox("请输入路径名称:", "参数输入(1/3)") FindString = InputBox("请输入查找文本:", "参数输入(2/3)") ReplaceString = InputBox("请输入替换文本:", "参数输入(3/3)") If Path = "" Or FindString = "" Or ReplaceS。

=ReplaceString;\, vbCritical; DoEvents Set CurPresentation = Presentations, ") ReplaceString = InputBox(", , ReadOnly;请输入查找文本.Replace(FindWhat:=ReplaceString;*.Slides For Each oShp In oSld.Replace(FindWhat;解决中文无法替换问题(下同) Do While Not oTmpRng Is Nothing FindCount = FindCount + 1 Set oTxtRng = oTxtRng:") FindString = InputBox(", vbTextCompare)' If Right(Path;":=FindString, _ oTxtRng, ReplaceString As StringDim oSld As SlideDim oShp As ShapeDim oTxtRng As TextRangeDim oTmpRng As TextRange Path = InputBox(", MatchCase, Mask As StringDim FindCount As LongDim CurPresentation As PresentationDim Path As String; " Or FindString = ", FindString, ;3)".Length, :", _ WholeWords.Length) Set oTmpRng = oTxtRng.Clear Do Until FileName = ":=msoFalse) For Each oSld In CurPresentation, FindString.Number = 0 Then Set oTmpRng = oTxtRng;3)"宏就是一个偷懒的命令 编好一个宏以后可以1步解决很多繁琐的设置 宏可以在所有PPT中使用 前提要保存好 给你一个简单的宏Sub 批量替换()Dim ChangedCount As IntegerDim FileName As String, " Then Path = Path & "请输入路径名称.TextFrame; Exit Sub End If ChangedCount = 0 FindCount = 0 Mask = ", MatchCase;;参数输入(2/参数输入(3/ FileName = Dir(Path & Mask) On Error Resume Next Err:", ReplaceString;\) If Path = ", ", _ Replacewhat;.ppt":=msoFalse.Shapes Err, WithWindow;""" Then MsgBox ", _ WholeWords;":=FindString, ;".Start + oTmpRng;:=True) If oTmpRng Is Nothing Then oTxtRng = Replace(oTxtRng;出错", 1) <参数输入(1/.Close FileName = Dir Loop MsgBox " Or ReplaceString = ":=False, FindString As String!".TextRange If Err;替换完毕.Characters(oTmpRng, ".Save CurPresentation;每个参数均不能为空;3)":=False.Open(FileName:=True) If oTmpRng Is Nothing Then oTxtRng = Replace(oTxtRng, _ Replacewhat.Clear Set oTxtRng = oShp;请输入替换文本:=Path & FileName;>!", vbTextCompare) Loop End If Next oShp Next oSld CurPresentation, ReplaceString 展开。

评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分)

【免责声明】本站信息来自网友投稿及网络整理,内容仅供参考,如果有错误请反馈给我们及时更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任。
版权所有:学窍知识网 Copyright © 2011-2026 www.at317.com All Rights Reserved .