智能艺术阵列

时间:2016-05-16 17:52:56

标签: arrays vba powerpoint powerpoint-vba

我编写了一个for循环来检查幻灯片上智能艺术中使用的每种字体大小,并输出形状中每个文本块的字体大小。由于某种原因,数组中的第一个条目正确更新(例如,我将有一个文本块作为字符串与字体大小连接)但数组中的任何后续条目只更新字体大小,但不要抓住实际的文本块。阵列正在被正确计算(例如,5个智能艺术形状被正确计算)。

#define MyIconFile "ThePathForMyCustomIcon"

[Setup]

SetupIconFile={#MyIconFile}   

[Icons]

Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{#MyIconFile}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"; IconFilename: "{#MyIconFile}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{#MyIconFile}"
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{#MyIconFile}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{#MyIconFile}"
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; IconFilename: "{#MyIconFile}"

2 个答案:

答案 0 :(得分:0)

想出来。需要使用.smartart.allnodes()而不是.groupitems:

osmrtSizeMatch(f) = .SmartArt.AllNodes(j).TextFrame2.TextRange.Text

答案 1 :(得分:0)

通过组项目处理SmartArt时,您需要对项目执行.HasTextFrame检查,否则可能会出现错误,例如SmartArt包含一行。