Share via

Powerpoint Record Hyperlink Selection

Anonymous
2014-06-10T14:29:20+00:00

Hi,

I am a healthcare educator working on a clinical case module in MS Powerpoint. The best way to describe the set-up is a "Choose your own adventure" powerpoint: the user clicks hyperlinks that equate to choices, and the link leads to a slide detailing consequences of the choice. For example, the user can choose to "take an x-ray" and link to an x-ray image, or "take an MRI" and lead to an MRI slide. There is a "menu" of hyperlinks on each slide that allows the user to choose what to do next.

I want to be able to record the choices made during case: i.e. the order of hyperlinks that have been clicked. In a perfect world, the results would populate an excel spreadsheet. Is there any way to make this possible using VBA, etc.?

Thanks

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

10 answers

Sort by: Most helpful
  1. Anonymous
    2014-06-11T08:04:42+00:00

    If you are not an experienced coder you might find it easier to create a csv file on the desktop like this. CSV files will open in Excel

    Sub recorder(oshp As Shape)

    Dim intFile As Integer

    Dim strText As String

    Dim strPath As String

    strPath = Environ("USERPROFILE") & "\Desktop\Data.csv"

    strText = oshp.Name & "," & oshp.Parent.SlideIndex

     intFile = FreeFile

        Open strPath For Append As intFile

        Print #intFile, strText

        Close intFile

    End Sub

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-06-11T01:58:12+00:00

    Ok, I was considering changing all the links into Actions/shapes, so now I will do that.  I think the real trouble for me is creating a code that will enter a value into an excel file when the hyperlink is clicked in powerpoint.   Any pointers there? Thanks for the help so far!

    Was this answer helpful?

    0 comments No comments
  3. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2014-06-11T01:41:46+00:00

    And rather than hyperlinks, consider using Actions, which can be set to run VBA macros when clicked, and the macro can decide what to do based on the name of the shape clicked, text in the shape, etc.

    Example:

    Sub ActionPlease(oSh as Shape)

         MsgBox "Whoa!  Dude!" & vbcrlf _

              & "You just clicked the shape named " & oSh.Name & vbcrlf _

              & "on slide number " & Cstr(oSh.Parent.SlideIndex)

    End Sub

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-06-10T21:31:10+00:00

    Thanks for the plug Steve. Click on Examples by Chapter to find the examples. Chapter 10 has the Excel stuff. As far as recording the hyperlink, that is pretty easy. First you have to use VBA code for the link itself (annoying but not difficult). Then you have to store the choices in variables. I'm thinking Chapter 7 and 8 would have that kind of stuff but I'm on my iPhone now so it is hard for me to look for the exact examples.

    Was this answer helpful?

    0 comments No comments
  5. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2014-06-10T20:11:55+00:00

    This would be possible using VBA, certainly.

    There might even be some example presentations/code on David Marcovitz' site to get you started:

    http://www.loyola.edu/edudept/powerfulpowerpoint/

    Was this answer helpful?

    0 comments No comments