Replace yourunit with the unit you want to open a spellbook with and ability rawcode with the ability rawcode of your spellbook (ctrl+D to see them).
JASS:
call IssueImmediateOrderById(yourunit,'ability rawcode')
If that doesn't work, then it's quite likely not possible.