Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / October 2006

Tip: Looking for answers? Try searching our database.

General ppt VBA questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barb Reinhardt - 23 Oct 2006 17:27 GMT
I'd like to be able to loop through all of the PPT slides in a presentation
and copy/paste data from Excel into those sheets.   I have some code that
will copy things from excel at this time and this is definitely a work in
progress.    I've done some VBA in excel, but none in PPT.     My questions
include:

1)  In Excel, I can create a worksheet code name so that I can reference the
appropriate sheet.    Is there some way to name the slides in a similar
manner?
2)  If I want to loop through the slides one by one, how would I do that?

Thanks.   I'm sure I'll be back.
Bill Dilworth - 23 Oct 2006 18:02 GMT
From PowerPoint ...
'========Start Code
Sub Iteration()

Dim oSld As Slide

For Each oSld In ActivePresentation.Slides
   oSld.Name = "MySlideName" & CStr(oSld.SlideIndex)
   'insert your code to bring XL stuff over
   Next oSld

End Sub
'========End Code

Please note that PowerPoint's object model is significantly different from
Excel's.

Signature

Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@     Please read the PowerPoint FAQ pages.
yahoo.             They answer most of our questions.
com                 www.pptfaq.com
.

> I'd like to be able to loop through all of the PPT slides in a
> presentation
[quoted text clipped - 11 lines]
>
> Thanks.   I'm sure I'll be back.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.