makryger
02-23-2008, 08:49 AM
So I spent a great deal of time trying to get a couple macros to work, so that I could have dynamically changing slide transitions on one mouseover, and lled an image control with a picture specified by the name of another object that is mouseovered.
Now, I am trying to send the file to other people who do not use powerpoint 2007, and the macros do not work. On an Office 2003 version, the macro settings were set to low, and nothing. Tried getting them the compabitibility pack so they could access the pptm file, still nothing. Tried the 2007 viewer, and that doesnt play macros.
What am I doing wrong?
(Code below, for reference.)
Sub image(oshp As Shape)
current_dir = CurDir()
image_name = oshp.Name
n = ActivePresentation.SlideShowWindow.View.Slide.SlideNumber
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Picture = LoadPicture(current_dir & "\Pictures\" & image_name & ".bmp")
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Visible = False
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Left = oshp.Left + (oshp.Width - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Width) / 2
If (oshp.Top - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Height) > 0 Then
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Top = oshp.Top - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Height
ElseIf (oshp.Top - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Height) < 0 Then
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Top = oshp.Top + oshp.Height
End If
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Visible = True
End Sub
Sub arrow(oshp As Shape)
intendedslide = oshp.ActionSettings(ppMouseClick).Hyperlink.SubAddress
intendedslide = Left(intendedslide, 3)
slidenum = ActivePresentation.Slides.FindBySlideID(intendedslide).SlideIndex
Select Case oshp.Name
Case Is = "left"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushRight
Case Is = "right"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushLeft
Case Is = "up"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushDown
Case Is = "down"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushUp
End Select
End Sub
Now, I am trying to send the file to other people who do not use powerpoint 2007, and the macros do not work. On an Office 2003 version, the macro settings were set to low, and nothing. Tried getting them the compabitibility pack so they could access the pptm file, still nothing. Tried the 2007 viewer, and that doesnt play macros.
What am I doing wrong?
(Code below, for reference.)
Sub image(oshp As Shape)
current_dir = CurDir()
image_name = oshp.Name
n = ActivePresentation.SlideShowWindow.View.Slide.SlideNumber
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Picture = LoadPicture(current_dir & "\Pictures\" & image_name & ".bmp")
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Visible = False
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Left = oshp.Left + (oshp.Width - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Width) / 2
If (oshp.Top - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Height) > 0 Then
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Top = oshp.Top - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Height
ElseIf (oshp.Top - ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Height) < 0 Then
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Top = oshp.Top + oshp.Height
End If
ActivePresentation.Slides(n).Shapes("Image1").OLEFormat.Object.Visible = True
End Sub
Sub arrow(oshp As Shape)
intendedslide = oshp.ActionSettings(ppMouseClick).Hyperlink.SubAddress
intendedslide = Left(intendedslide, 3)
slidenum = ActivePresentation.Slides.FindBySlideID(intendedslide).SlideIndex
Select Case oshp.Name
Case Is = "left"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushRight
Case Is = "right"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushLeft
Case Is = "up"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushDown
Case Is = "down"
ActivePresentation.Slides(slidenum).SlideShowTransition.EntryEffect = ppEffectPushUp
End Select
End Sub