creating word doc of course menu

Nov 01, 2019

Is there a way to generate a word doc from the menu listing without manually retyping it?

thanks.

2 Replies
Thor Melicher

Here's another solution that I came up with that uses Microsoft Word if you don't have a tool like SnagIt available.

1. Publish your file so you have a Storyline Output folder.
2. Open the story_content folder.
3. Open the frame.xml file in a program like Notepad and copy the text.
4. Paste the text in the Word file that I've attached.
5. Run the macro, GetMenuEntriesFromStoryline.

Note: Instructions are included in the file and explains how to run a macro manually in Word.  You'll need to enable macros if prompted.

A little background information:

Storyline writes menu entries in the frame.xml file.  I wrote some code (heavily borrowed from here) so that it finds those entries and puts them in a new Word document.  No doubt about it, there are more elegant solutions by using XML parsers but for a quick solution and so others can use easily, this seemed a good way of doing it. 

Please note: Being that this isn't an XML parser, it's not possible with this solution to determine what is a scene title or a slide title.  You'll just get a running list.

If you're concerned about macros or you want to create your own solution, here's the code you'll find in the file:

Sub GetMenuEntriesFromStoryline()

    Dim firstTerm As String
    Dim secondTerm As String
    Dim myRange As Range
    Dim documentText As String

    Dim startPos As Long 'Stores the starting position of firstTerm
    Dim stopPos As Long 'Stores the starting position of secondTerm based on first term's location
    Dim nextPosition As Long 'The next position to search for the firstTerm

    nextPosition = 1

    'This is where Storyline codes it's menu entries. The Chr(34) is ASCII for a quotation mark.
    firstTerm = "displaytext=" & Chr(34)
    secondTerm = Chr(34)

    'Get all the document text and store it in a variable.
    Set myRange = ActiveDocument.Range
    documentText = myRange.Text
   
    'Create a new document to place your information
    Set NewDocument = Documents.Add

    'Loop documentText till it can't find any more entries
    '
    Do Until nextPosition = 0
       
        'Find the instance of displaytext where the entry is stored.
        startPos = InStr(nextPosition, documentText, firstTerm, vbTextCompare)
       
        'Find where the end of the entry - add 13 to the start position so it begins after displaytext="
        stopPos = InStr(startPos + 13, documentText, secondTerm, vbTextCompare)
           
       
        'Write the information out to the new document.
        Selection.TypeText Text:=Mid$(documentText, startPos + Len(firstTerm), stopPos - startPos - Len(secondTerm) - 12) & vbCr
       
        'Continue looking for the next instance.
        nextPosition = InStr(stopPos, documentText, firstTerm, vbTextCompare)
    Loop

    MsgBox "Complete!"

End Sub

Holly Heston

Matthew and Thor

Thanks for both your suggestions.

I don't have Snagit or any other tool that will extract the text. Snagit Editor doesn't have that feature.

I started down the macro path but was held up with our system disabling macros.

However, having looked at publishing, I realized that publishing in word and deleting the unneeded text/items then pasting the menu items into a new word doc worked well.

Thanks for your ideas. I may use them down the road if I have longer courses.

This discussion is closed. You can start a new discussion or contact Articulate Support.