You can find the answer if you look more carefully at your screenshot: Adobe has failed to update their own sample VB scripts in CC 2017. They install scripts for the previous version -- CC 2015. (What a blunder! )
You can open and edit the script in Notepad changing 5 to 7
Set myInDesign = CreateObject("InDesign.Application.CC.2017")
or remove the version at all, like so:
Set myInDesign = CreateObject("InDesign.Application")
This will fix the problem.