提前为我糟糕的英语道歉,我使用了部分谷歌翻译...
我坚持骑自行车所有分散在Ppt幻灯片中的文本框。 我应该做的是我的程序最初是从Word打开一个Ppt文件,或搜索在用作标签的文本框中输入的代码。 一旦我找到相应的代码(我不知道我是否写得正确)应该制作整张幻灯片的副本(我不知道如何告诉它采取文本框的那个)并将其粘贴在页面上(对于现在随意)在Word中。 我在Google上搜索并找到了一个看起来很好的代码,但我是" ERROR 13"在第二个" For Each"
public sub elaboraSlidePpt ()
Dim pptPres As PowerPoint.Presentation
Dim pptApp As PowerPoint.Application
Dim pptSlide As PowerPoint.Slide
Dim pptPath As String
Set doc = Application.ActiveDocument
Dim docPpt As Slide
pptPath = file_dir + "\" + file_name
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Visible = False
Set pptPres = pptApp.Presentations.Open(pptPath)
Dim sld As Slide, shp As Shape
For Each sld In pptApp.ActivePresentation.Slides
For Each shp In sld.Shapes '<-- ERROR 13
If shp.Type = "img10" Then
pptApp.ActivePresentation.Slides(????).Copy
Application.ActiveDocument.Activate
Selection.PasteAndFormat (wdPasteEnhancedMetafile)
End If
Next shp
Next sld
end sub
答案 0 :(得分:1)
我已经纠正了很多事情。试一试:
enum Languages {
case english
case portuguese
}
var myLabel = UILabel()
let myLabelText : [Languages : String] = [
Languages.english : "My Label",
Languages.portuguese : "Minha Etiqueta"
]
func updateLanguage(to language : Languages) {
// Updates myLabel's text in real time:
myLabel.text = myLabelText[language]
// Update other UI elements below...
}