Click here to Skip to main content
15,920,053 members
Home / Discussions / C#
   

C#

 
QuestionC# and Power Point Pin
PDTUM3-May-11 7:55
PDTUM3-May-11 7:55 
AnswerRe: C# and Power Point Pin
Pete O'Hanlon3-May-11 9:36
mvePete O'Hanlon3-May-11 9:36 
AnswerRe: C# and Power Point Pin
PDTUM3-May-11 13:01
PDTUM3-May-11 13:01 
Ok Pete....just did not know where to turn on this one so I took a shot. The good news is that your suggestion worked; I was able to modify some VBA code I found and make it work along the following lines (even though I have never written a word in VB before):

Public Sub ChangeBackgrounds()

'Global array to store pic names
Dim PictureList(1 To 10) As String

'List of pictures - in same directory as ppt:
PictureList(1) = "pic1.JPG"
PictureList(2) = "pic2.JPG"
PictureList(3) = "pic3.JPG"
PictureList(4) = "pic4.JPG"
PictureList(5) = "pic5.JPG"
PictureList(6) = "pic6.JPG"
PictureList(7) = "pic7.JPG"
PictureList(8) = "pic8.JPG"
PictureList(9) = "pic9.JPG"
PictureList(10) = "pic10.JPG"

'Define a slide
Dim mySlide As Slide

'Iterate through every slide in the presentation
For Each mySlide In ActivePresentation.Slides.Range

Dim PictureChoice

'Give us a random number between 1 and 10 as PictureChoice
PictureChoice = Int((20 * Rnd) + 1)

' Don't follow the master background style
mySlide.FollowMasterBackground = msoFalse
mySlide.Background.Fill.UserPicture (PictureList(PictureChoice)) 'Use our random number to choose a picture from the list

Next mySlide

End Sub

Thanks...Pat
GeneralRe: C# and Power Point Pin
wizardzz4-May-11 10:01
wizardzz4-May-11 10:01 
QuestionConnection String problem Pin
si_693-May-11 6:01
si_693-May-11 6:01 
AnswerRe: Connection String problem Pin
Ian Shlasko3-May-11 6:17
Ian Shlasko3-May-11 6:17 
AnswerRe: Connection String problem Pin
Pete O'Hanlon3-May-11 6:18
mvePete O'Hanlon3-May-11 6:18 
AnswerRe: Connection String problem Pin
DaveAuld3-May-11 6:20
professionalDaveAuld3-May-11 6:20 
AnswerRe: Connection String problem Pin
Luc Pattyn3-May-11 6:28
sitebuilderLuc Pattyn3-May-11 6:28 
GeneralRe: Connection String problem Pin
Pete O'Hanlon3-May-11 6:44
mvePete O'Hanlon3-May-11 6:44 
GeneralRe: Connection String problem Pin
Luc Pattyn3-May-11 6:51
sitebuilderLuc Pattyn3-May-11 6:51 
Questiona try inside another Pin
Ali Al Omairi(Abu AlHassan)3-May-11 0:44
professionalAli Al Omairi(Abu AlHassan)3-May-11 0:44 
AnswerRe: a try inside another Pin
Rick van Woudenberg3-May-11 1:07
Rick van Woudenberg3-May-11 1:07 
AnswerRe: a try inside another Pin
Luc Pattyn3-May-11 1:12
sitebuilderLuc Pattyn3-May-11 1:12 
GeneralRe: a try inside another Pin
Rick van Woudenberg3-May-11 1:21
Rick van Woudenberg3-May-11 1:21 
GeneralRe: a try inside another Pin
Pete O'Hanlon3-May-11 1:44
mvePete O'Hanlon3-May-11 1:44 
GeneralRe: a try inside another Pin
Rick van Woudenberg3-May-11 1:57
Rick van Woudenberg3-May-11 1:57 
GeneralRe: a try inside another Pin
J4amieC3-May-11 3:00
J4amieC3-May-11 3:00 
GeneralRe: a try inside another Pin
Rick van Woudenberg3-May-11 4:14
Rick van Woudenberg3-May-11 4:14 
GeneralRe: a try inside another Pin
J4amieC3-May-11 4:36
J4amieC3-May-11 4:36 
GeneralRe: a try inside another Pin
BobJanova3-May-11 4:44
BobJanova3-May-11 4:44 
GeneralRe: a try inside another Pin
J4amieC3-May-11 4:50
J4amieC3-May-11 4:50 
GeneralRe: a try inside another Pin
Pete O'Hanlon3-May-11 5:41
mvePete O'Hanlon3-May-11 5:41 
GeneralRe: a try inside another Pin
Rick van Woudenberg3-May-11 23:52
Rick van Woudenberg3-May-11 23:52 
GeneralRe: a try inside another Pin
Gary Wheeler4-May-11 0:44
Gary Wheeler4-May-11 0:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.