I posted this in the Office section, but was asked to post here instead.
I have been working on some PowerPoint animation that works like a quiz. A list box has possible answers, and depending on the answer they choose, a textbox has a certain value and color to it. I would also like to animate the text box so it looks slick. Here is the code I have so far:
CODE
All of this works, and now I jsut also want to add a line for each answer like
docmd.animation = fly in left
or
txtExample.entrance = (flyin, Left)
lol
I know that's not right, but I am guessing someone out there might know what would be right. Is there also a list of the vba names for the animations for entrance and emphasis, etc?
Besides this, I am working on the end of the powerpoint, sending an email to a static address letting them know that this user has completed the presentation. I have it working with the following code. The only problem is that Outlook asks for permission to send the email. This is on an internal network, and I really want to put something in the code to trust the email or to say yes to the permission for the user. One big problem is that you are in presentation mode, and the permission box has a habit of going behind the presentation, then you can't see it. Please take a look at the code if you can and let me know if you have any thoughts.
Thank you!
misscrf
It is never too late to become what you could have been ~ George Eliot
I have been working on some PowerPoint animation that works like a quiz. A list box has possible answers, and depending on the answer they choose, a textbox has a certain value and color to it. I would also like to animate the text box so it looks slick. Here is the code I have so far:
CODE
Code:
Private Sub ListBox1_Click()
If ListBox1 <> "" Then
answer = ListBox1
If answer = "My Answer 1" Then
txtExample = "That's part right, but there's more!"
txtExample.SpecialEffect = fmBorderStyleSingle
txtExample.ForeColor = RGB(128, 0, 255)
'Color - Purple
txtExample.BackColor = RGB(0, 255, 255)
'Color - Cyan
txtExample.BorderColor = RGB(0, 0, 0)
'Color - Black
ElseIf answer = "My Answer 2" Then
txtExample = "That's kinda sorta right, but there's some more!"
txtExample.SpecialEffect = fmBorderStyleSingle
txtExample.ForeColor = RGB(0, 191, 255)
'Color - Deep Sky Blue
txtExample.BackColor = RGB(173, 255, 47)
'Color - Green Yellow
txtExample.BorderColor = RGB(255, 20, 147)
'Color - Deep Pink
ElseIf answer = "My Answer 3" Then
txtExample = "There's more, but that is part of it!"
txtExample.SpecialEffect = fmBorderStyleSingle
txtExample.ForeColor = RGB(240, 128, 128)
'Color - Light Coral
txtExample.BackColor = RGB(216, 191, 216)
'Color - Thistle
txtExample.BorderColor = RGB(218, 165, 32)
'Color - Goldenrod
ElseIf answer = "My Correct Answer 4" Then
txtExample = "WOHOOOOOO!!!!! You Got it Right!"
txtExample.SpecialEffect = fmBorderStyleSingle
txtExample.ForeColor = RGB(208, 32, 144)
'Color - Violet Red
txtExample.BackColor = RGB(245, 245, 220)
'Color - Beige
txtExample.BorderColor = RGB(0, 250, 154)
'Color - Green
End If
End If
End Sub
All of this works, and now I jsut also want to add a line for each answer like
docmd.animation = fly in left
or
txtExample.entrance = (flyin, Left)
lol
I know that's not right, but I am guessing someone out there might know what would be right. Is there also a list of the vba names for the animations for entrance and emphasis, etc?
Besides this, I am working on the end of the powerpoint, sending an email to a static address letting them know that this user has completed the presentation. I have it working with the following code. The only problem is that Outlook asks for permission to send the email. This is on an internal network, and I really want to put something in the code to trust the email or to say yes to the permission for the user. One big problem is that you are in presentation mode, and the permission box has a habit of going behind the presentation, then you can't see it. Please take a look at the code if you can and let me know if you have any thoughts.
Code:
Private Sub CommandButton1_Click()
Dim objOutlook As Object 'Outlook.Application
Dim objOutlookMsg As Object 'Outlook.MailItem
Dim objOutlookRecip As Object 'Outlook.Recipient
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("me@email.com")
objOutlookRecip.Type = 1
' Set the Subject and Body of the message; save and send message
.Subject = "Harrassment Presentation Completed"
' this could be from a variable if you have one
.Body = Me.txtExample & " has successfully completed the Presentation on " & Date
'this was code I tried to trust the email - didn't work
.Save
' objMailItem.Save
'Set objSafeMail = CreateObject("Redemption.SafeMailItem")
'objSafeMail.Item = objMailItem
'objSafeMail.Send
.Send
End With
Set objOutlook = Nothing
End Sub
misscrf
It is never too late to become what you could have been ~ George Eliot