Consulting

Results 1 to 3 of 3

Thread: Macros crippled outside of ppt 2007!

  1. #1

    Unhappy Macros crippled outside of ppt 2007!

    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
    Last edited by Aussiebear; 04-28-2023 at 08:52 PM. Reason: Adjusted the code tags

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Try saving as a ppt file see if that works for them
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    Tried that too, no luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •