列出选定的幻灯片索引号
我有一个大型演示文稿,我希望选择位于不同位置的多张幻灯片并收到幻灯片索引号的列表。我的想法是让这个列表出现在消息框中。
到目前为止,我已经整理了下面的内容,在不同的消息框中给出了每个幻灯片的编号。我正在寻找一个出现在 1 个消息框中的列表,我可以将其复制并粘贴到电子邮件中。
理想情况下,我想在消息框中添加一些额外的文本,以便我可以复制并粘贴到预先制作的电子邮件中。不过我也许可以承担这个角色。
任何帮助都会受到极大的欢迎。
Sub ShowMeSlideNumbers()
Dim oSld As Slide
For Each oSld In ActiveWindow.Selection.SlideRange
MsgBox "The slide index of the current slide is:" & oSld.SlideIndex
Next oSld
Exit Sub
End Sub
I have a large presentation and I'm looking to select a number of slides positioned a different positions and receive a list of the slide index numbers. My idea is for this list to appear in a message box.
So far I have put together the below which gives me each slide number in different message boxes. I'm looking for a list to appear in 1 message box that I can copy and paste into an email.
Ideally I'd like to add some extra text to the message box so I can copy and paste to a pre made email. I can probably take that part on though.
Any help would be greatly received.
Sub ShowMeSlideNumbers()
Dim oSld As Slide
For Each oSld In ActiveWindow.Selection.SlideRange
MsgBox "The slide index of the current slide is:" & oSld.SlideIndex
Next oSld
Exit Sub
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过创建一个数组来存储选定的索引号来完成此操作。然后以相反的顺序读回数组数字以创建一个字符串。最后,将该字符串显示为 MsgBox 的一部分:
You can do this by creating an array to store the selected index numbers. Then read the array numbers back in reverse order to create a string. Finally, display that string as part of a MsgBox:
现有代码的简单修改应该可以做到这一点:
A simple mod of your existing code should do it: