lia*_*dee 210 windows microsoft-office microsoft-powerpoint-2010 microsoft-powerpoint
我想更改 Powerpoint 中所有幻灯片的校对语言。我尝试通过语言首选项菜单设置语言,但这只会为新的 powerpoint 更改它。
Mas*_*len 215
要轻松更改整个PowerPoint的语言,请打开“视图”选项卡并选择“大纲”视图。
现在按
同样,当您选择了所有内容时,您可以更改其他内容,例如字体、颜色等。当然,在许多情况下,这最好通过更改幻灯片母版来完成,但有许多编辑器的演示文稿可能有很多“硬”格式设置,偏离底层master,需要重置才能保持一致。您还可以将单个幻灯片重置为母版样式,但这可能会导致占位符移动,这在某些情况下可能是不可取的。
至于我 -需要重新启动PowerPoint 。可能是因为我也确实改变了编辑语言:
lia*_*dee 35
使用Powerpoint 2010我打开了大纲菜单 -
选择所有文本 (Ctrl+A),打开语言菜单并设置我的校对语言
它奏效了!
语言菜单位于“审阅”功能区选项卡上(在“幻灯片放映”选项卡之后,在屏幕截图上不可见)。
Dun*_*nes 31
我改进了Inigo 的答案,提供了一个递归版本,将所有项目更改为所需的语言。
此版本将递归调查属于组类型的每个形状。一些实验表明msoGroup
和msoSmartArt
是组类型 - 如果您发现可以容纳文本对象的其他类型的形状,请随意添加到该列表中。
Sub ChangeProofingLanguageToEnglish()
Dim j As Long, k As Long
Dim languageID As MsoLanguageID
'Set this to your preferred language
languageID = msoLanguageIDEnglishUK
For j = 1 To ActivePresentation.Slides.Count
For k = 1 To ActivePresentation.Slides(j).Shapes.Count
ChangeAllSubShapes ActivePresentation.Slides(j).Shapes(k), _
languageID
Next k
Next j
End Sub
Sub ChangeAllSubShapes(targetShape As shape, languageID As MsoLanguageID)
Dim i As Long
If targetShape.HasTextFrame Then
targetShape.TextFrame.TextRange.languageID = languageID
End If
Select Case targetShape.Type
Case msoGroup, msoSmartArt
For i = 1 To targetShape.GroupItems.Count
ChangeAllSubShapes targetShape.GroupItems.Item(i), languageID
Next i
End Select
End Sub
Run Code Online (Sandbox Code Playgroud)
小智 28
现有答案适用于大纲中的文本。不幸的是,就我而言,这并没有涵盖文本的重要部分,包括数字、表格等。
这个宏为我解决了这个问题:
Sub ChangeProofingLanguageToEnglish()
Dim j, k, m, scount, fcount, gcount As Integer
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k) _
.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUS
End If
If ActivePresentation.Slides(j).Shapes(k).Type = msoGroup Then
gcount = ActivePresentation.Slides(j).Shapes(k).GroupItems.Count
For m = 1 To gcount
If ActivePresentation.Slides(j).Shapes(k).GroupItems.Item(m).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k).GroupItems.Item(m) _
.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUS
End If
Next m
End If
Next k
Next j
End Sub
Run Code Online (Sandbox Code Playgroud)
上述宏中使用的“msoLanguageIDEnglishUS”可以替换为任何所需的语言。可以在本文中找到完整的语言列表
(归功于在这里发布原始宏的 Ganesh Kumar 。我添加了对第一级形状分组的支持。为了进一步改进它,宏可以递归查找包含其他组等的组)
tri*_*sse 14
根据 Inigo、Duncan、Maria 和 DomDev 的回答,这适用于现在和将来的形状、表格、组、SmartArt:
Sub ChangeProofingLanguageToFrench()
Dim j, k As Integer
Dim languageID As MsoLanguageID
'Set this to your preferred language
languageID = msoLanguageIDFrench
'Loop all the slides in the document, and change the language
For j = 1 To ActivePresentation.Slides.Count
For k = 1 To ActivePresentation.Slides(j).Shapes.Count
ChangeAllSubShapes ActivePresentation.Slides(j).Shapes(k), languageID
Next k
Next j
'Loop all the master slides, and change the language
For j = 1 To ActivePresentation.SlideMaster.CustomLayouts.Count
For k = 1 To ActivePresentation.SlideMaster.CustomLayouts(j).Shapes.Count
ChangeAllSubShapes ActivePresentation.SlideMaster.CustomLayouts(j).Shapes(k), languageID
Next k
Next j
'Change the default presentation language, so that all new slides respect the new language
ActivePresentation.DefaultLanguageID = languageID
End Sub
Sub ChangeAllSubShapes(targetShape As Shape, languageID As MsoLanguageID)
Dim i As Integer, r As Integer, c As Integer
If targetShape.HasTextFrame Then
targetShape.TextFrame.TextRange.languageID = languageID
End If
If targetShape.HasTable Then
For r = 1 To targetShape.Table.Rows.Count
For c = 1 To targetShape.Table.Columns.Count
targetShape.Table.Cell(r, c).Shape.TextFrame.TextRange.languageID = languageID
Next
Next
End If
Select Case targetShape.Type
Case msoGroup, msoSmartArt
For i = 1 To targetShape.GroupItems.Count
ChangeAllSubShapes targetShape.GroupItems.Item(i), languageID
Next i
End Select
End Sub
Run Code Online (Sandbox Code Playgroud)
除了Mastergalen提供的答案以及解决有关新类型文本的评论之外:
如果您注意到,每当您开始输入新文本时,该语言将自动变回(这很烦人),您必须更改 PowerPoint 的当前默认语言:
Windows Taskbar
(是的,实际上不在 PowerPoint 中),检查是否Language bar
可见,
Control Panel > Region and Language > Keyboards and Languages
。单击Change keybords...
,切换到Language bar
选项卡并检查Docked in the taskbar
选项。(这是来自Win7,因此在其他版本中可能会有所不同)。Language bar
任务栏中,单击语言代码并切换到 EN(如果您当前希望在 PowerPoint 中使用英语)。从现在开始,PowerPoint 中的所有新文本都将使用所选语言:-)小智 7
Duncan 版本适用于除表格之外的所有内容。我发现了另一个似乎也适用于表格的代码:https : //stackoverflow.com/questions/4735765/powerpoint-2007-set-language-on-tables-charts-etc-that-contains-text
Run Code Online (Sandbox Code Playgroud)Public Sub changeLanguage() On Error Resume Next Dim gi As GroupShapes '<-this was added. used below 'lang = "English" lang = "Norwegian" 'Determine language selected If lang = "English" Then lang = msoLanguageIDEnglishUK ElseIf lang = "Norwegian" Then lang = msoLanguageIDNorwegianBokmol End If 'Set default language in application ActivePresentation.DefaultLanguageID = lang 'Set language in each textbox in each slide For Each oSlide In ActivePresentation.Slides Dim oShape As Shape For Each oShape In oSlide.Shapes 'Check first if it is a table If oShape.HasTable Then For r = 1 To oShape.Table.Rows.Count For c = 1 To oShape.Table.Columns.Count oShape.Table.Cell(r, c).Shape.TextFrame.TextRange.LanguageID = lang Next Next Else Set gi = oShape.GroupItems 'Check if it is a group of shapes If Not gi Is Nothing Then If oShape.GroupItems.Count > 0 Then For i = 0 To oShape.GroupItems.Count - 1 oShape.GroupItems(i).TextFrame.TextRange.LanguageID = lang Next End If 'it's none of the above, it's just a simple shape, change the language ID Else oShape.TextFrame.TextRange.LanguageID = lang End If End If Next Next End Sub
我在 2014 年为自己制作了一个插件,它在 PowerPoint 2016 中仍然可以正常工作。https://github.com/wobba/officeaddin/releases/tag/v1.0.1
它会扫描使用过的语言,并允许您一次更改所有内容,循环播放。
归档时间: |
|
查看次数: |
453729 次 |
最近记录: |